diff options
author | Dan Williams <dcbw@localhost.localdomain> | 2006-11-16 21:50:36 (GMT) |
---|---|---|
committer | Dan Williams <dcbw@localhost.localdomain> | 2006-11-16 21:50:36 (GMT) |
commit | a02915748804918ca9f34c9c654e04817866feb5 (patch) | |
tree | a78fe175660c8c790e83919ec5f2e486473cb6f4 | |
parent | b51b2917d0999ac214d1cc801cf7be4e493a9aab (diff) |
Remap keys to match OLPC keyboard and use Shift+Alt for non-OLPC machines
-rw-r--r-- | README | 10 | ||||
-rw-r--r-- | shell/data/kbdconfig | 2 | ||||
-rw-r--r-- | shell/view/Shell.py | 27 |
3 files changed, 27 insertions, 12 deletions
@@ -26,8 +26,10 @@ F5 Decrease brightness (DCON) F6 Increase brightness (DCON) F7 Color mode (DCON) F8 Black and white mode (DCON) -F9 Show the frame -F10 Toggle chat visibility -F11 Open a terminal activity -F12 Open the log viewer + +Shift+Alt+F9 Show the frame +Shift+Alt+F10 Toggle chat visibility +Shift+Alt+F11 Open a terminal activity +Shift+Alt+F12 Open the log viewer + Ctrl+S Activate sketch mode in chat diff --git a/shell/data/kbdconfig b/shell/data/kbdconfig index 30e4953..a336b77 100644 --- a/shell/data/kbdconfig +++ b/shell/data/kbdconfig @@ -6,6 +6,6 @@ <Alt>p=prev <Alt>c=close -F12=!sugar-log-viewer +<Alt><Shift>F12=!sugar-log-viewer <Alt>q=!sugar-emulator-shutdown <Alt><Shift>Escape=!sugar-shutdown diff --git a/shell/view/Shell.py b/shell/view/Shell.py index 0bb4948..3d942ba 100644 --- a/shell/view/Shell.py +++ b/shell/view/Shell.py @@ -65,9 +65,14 @@ class Shell(gobject.GObject): self._key_grabber.grab('F6') self._key_grabber.grab('F7') self._key_grabber.grab('F8') - self._key_grabber.grab('F9') - self._key_grabber.grab('F10') - self._key_grabber.grab('F11') + self._key_grabber.grab('0xDC') # Camera key + self._key_grabber.grab('0xE0') # Overlay key + self._key_grabber.grab('0x93') # Frame key + + # For non-OLPC machines + self._key_grabber.grab('<shft><alt>F9') + self._key_grabber.grab('<shft><alt>F10') + self._key_grabber.grab('<shft><alt>F11') self._home_window = HomeWindow(self) self._home_window.show() @@ -102,15 +107,23 @@ class Shell(gobject.GObject): self._dcon_manager.set_mode(DCONManager.COLOR_MODE) elif key == 'F8': self._dcon_manager.set_mode(DCONManager.BLACK_AND_WHITE_MODE) - elif key == 'F9': + elif key == '<shft><alt>F9': self._frame.notify_key_press() - elif key == 'F10': + elif key == '<shft><alt>F10': self.toggle_chat_visibility() - elif key == 'F11': + elif key == '<shft><alt>F11': gobject.idle_add(self._open_terminal_cb) + elif key == '0xDC': # Camera key + pass + elif key == '0xE0': # Overlay key + self.toggle_chat_visibility() + elif key == '0x93': # Frame key + self._frame.notify_key_press() def __global_key_released_cb(self, grabber, key): - if key == 'F5': + if key == '<shft><alt>F9': + self._frame.notify_key_release() + elif key == '0x93': self._frame.notify_key_release() def __window_opened_cb(self, screen, window): |