Skip to content

Commit

Permalink
Merge pull request #55 from KanoComputing/safe-display
Browse files Browse the repository at this point in the history
kano-uixinit switch display to safe mode if keyboard caps-lock is on
  • Loading branch information
pazdera committed Jan 13, 2015
2 parents 44e75dd + 9bf0627 commit ffe52d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/kano-uixinit
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down

0 comments on commit ffe52d8

Please sign in to comment.