diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-06-20 00:47:50 +0200 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-06-20 00:47:50 +0200 |
| commit | f4f95815f066c499bd38fd5f544a4bae0e18ac99 (patch) | |
| tree | c4057d4cb826c8b8d470979afc06aa891f0edea6 /dash | |
| parent | 8668048ec1345083f555a1412bc88e4873dc6989 (diff) | |
KeyboardUtil: move to unity-shared and add IsPrintableKeySymbol() method
(bzr r2364.9.2)
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/DashView.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/dash/DashView.cpp b/dash/DashView.cpp index 667bd9dff..da66419b5 100644 --- a/dash/DashView.cpp +++ b/dash/DashView.cpp @@ -30,6 +30,7 @@ #include <UnityCore/RadioOptionFilter.h> #include "unity-shared/DashStyle.h" +#include "unity-shared/KeyboardUtil.h" #include "unity-shared/UnitySettings.h" #include "unity-shared/UBusMessages.h" @@ -890,21 +891,8 @@ Area* DashView::FindKeyFocusArea(unsigned int key_symbol, } } - bool valid_search_key = false; - - if (direction == KEY_NAV_NONE) - { - /* Excluding meta chars, see keysymdef.h for reference */ - if (x11_key_code < XK_Select || x11_key_code > XK_Hyper_R) - { - if (x11_key_code == XK_Delete || x11_key_code == XK_BackSpace) - valid_search_key = true; - else - valid_search_key = g_unichar_isprint(x11_key_code); - } - } - - if (valid_search_key || search_bar_->im_preedit) + if ((direction == KEY_NAV_NONE && ui::KeyboardUtil::IsPrintableKeySymbol(x11_key_code)) || + search_bar_->im_preedit) { // then send the event to the search entry return search_bar_->text_entry(); |
