X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsystemkeyboardinput.cpp;h=f5657bd7d49066d4c854279bfbfde8705ddbd55a;hb=HEAD;hp=a99183231f08e66203e5d16112e9cfbacdecbe3c;hpb=6e5db3e5ba48b5e68efd38360a20ce127cd23578;p=libs%2Fgltk.git diff --git a/source/systemkeyboardinput.cpp b/source/systemkeyboardinput.cpp index a991832..3c44398 100644 --- a/source/systemkeyboardinput.cpp +++ b/source/systemkeyboardinput.cpp @@ -7,8 +7,7 @@ namespace GLtk { SystemKeyboardInput::SystemKeyboardInput(Root &r, Input::Keyboard &k): InputMethod(r), - keyboard(k), - modifier_state(0) + keyboard(k) { keyboard.signal_button_press.connect(sigc::mem_fun(this, &SystemKeyboardInput::key_press)); keyboard.signal_button_release.connect(sigc::mem_fun(this, &SystemKeyboardInput::key_release)); @@ -36,7 +35,7 @@ bool SystemKeyboardInput::key_press(unsigned key) case Input::KEY_RIGHT: return root.navigate(NAV_RIGHT); case Input::KEY_UP: return root.navigate(NAV_UP); case Input::KEY_DOWN: return root.navigate(NAV_DOWN); - case Input::KEY_TAB: return root.navigate(NAV_NEXT); + case Input::KEY_TAB: return root.navigate((modifier_state&MOD_SHIFT) ? NAV_PREVIOUS : NAV_NEXT); case Input::KEY_SPACE: return root.navigate(NAV_ACTIVATE); case Input::KEY_ENTER: return root.navigate(NAV_ACCEPT); case Input::KEY_ESC: return root.navigate(NAV_CANCEL);