diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2014-03-19 17:04:14 -0700 |
|---|---|---|
| committer | Brandon Schaefer <brandontschaefer@gmail.com> | 2014-03-19 17:04:14 -0700 |
| commit | b63ae2b0bc27ea09b8f6b2dfafb18d7e6a1fced6 (patch) | |
| tree | 2114449cb536c81bb28d7e1f2a56756cb9ef3472 /launcher | |
| parent | 7d8f3e08475ebe419b1dcf6a684534b82bb0021d (diff) | |
* Move both key_code conversions to the HandleKeyEvent function
(bzr r3731.2.2)
Diffstat (limited to 'launcher')
| -rw-r--r-- | launcher/LauncherController.cpp | 5 | ||||
| -rw-r--r-- | launcher/LauncherController.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/launcher/LauncherController.cpp b/launcher/LauncherController.cpp index 6e8d03978..3cf22779d 100644 --- a/launcher/LauncherController.cpp +++ b/launcher/LauncherController.cpp @@ -1251,8 +1251,11 @@ void Controller::HandleLauncherKeyRelease(bool was_tap, int when) } } -bool Controller::HandleLauncherKeyEvent(unsigned long key_state, unsigned int key_code, Time timestamp) +bool Controller::HandleLauncherKeyEvent(unsigned long key_state, unsigned int key_sym, Time timestamp) { + // Turn the key_sym back to a keycode, this turns keypad key_sym to the correct top row key_code + unsigned int key_code = XKeysymToKeycode(nux::GetGraphicsDisplay()->GetX11Display(), key_sym); + // Shortcut to start launcher icons. Only relies on Keycode, ignore modifier for (auto const& icon : *pimpl->model_) { diff --git a/launcher/LauncherController.h b/launcher/LauncherController.h index 96b849b1e..305caa0c3 100644 --- a/launcher/LauncherController.h +++ b/launcher/LauncherController.h @@ -67,7 +67,7 @@ public: void HandleLauncherKeyPress(int when); void HandleLauncherKeyRelease(bool was_tap, int when); - bool HandleLauncherKeyEvent(unsigned long key_state, unsigned int key_code, Time timestamp); + bool HandleLauncherKeyEvent(unsigned long key_state, unsigned int key_sym, Time timestamp); void KeyNavActivate(); void KeyNavGrab(); |
