From 9bf0627343dcca8b6069b38e624426366ab5f860 Mon Sep 17 00:00:00 2001 From: Albert Casals Date: Tue, 13 Jan 2015 12:02:26 +0000 Subject: [PATCH] kano-uixinit switch display to safe mode if keyboard caps-lock is on --- bin/kano-uixinit | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/kano-uixinit b/bin/kano-uixinit index a3c31e5..85dc7f0 100755 --- a/bin/kano-uixinit +++ b/bin/kano-uixinit @@ -123,6 +123,13 @@ else set_keyboard $kano_keyboard fi +# If keyboard Caps Lock is on, fallback to safe display resolution +capson=`xset -q | grep "Caps Lock" | awk '{ print $4}'` +if [ "$capson" == "on" ]; then + logger_info "Keyboard CapsLock is on: switching video to safe mode" + python -c "from kano_settings.system.display import switch_display_safe_mode; switch_display_safe_mode()" +fi + # startmouse logger_info "Launching startmouse" /usr/bin/startmouse &