diff options
Diffstat (limited to 'kkbswitch/kbswitchapp.cpp')
-rw-r--r-- | kkbswitch/kbswitchapp.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/kkbswitch/kbswitchapp.cpp b/kkbswitch/kbswitchapp.cpp index 5e53487..0c9f675 100644 --- a/kkbswitch/kbswitchapp.cpp +++ b/kkbswitch/kbswitchapp.cpp @@ -130,15 +130,25 @@ void KBSwitchApp::forceSetGroup(int groupno) m_xkb.setGroupNo(groupno); } -/** No descriptions */ +/** Select the next keyboard layout (wraps around) */ void KBSwitchApp::slotSelectNextGroup() { #ifdef HAVE_LIBXKLAVIER m_xkb.setGroupNo(XklGetNextGroup()); -#else +#else //forceSetGroup(m_next_groupno); m_xkb.setGroupNo(m_next_groupno); -#endif +#endif +} + +/** Select the previous keyboard layout (wraps around) */ +void KBSwitchApp::slotSelectPrevGroup() +{ +#ifdef HAVE_LIBXKLAVIER + m_xkb.setGroupNo(XklGetPrevGroup()); +#else + m_xkb.setGroupNo(m_kbconf.getPrevGroup(m_cur_groupno)); +#endif } /** No descriptions */ |