summaryrefslogtreecommitdiffstats
path: root/kcontrol/keys
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-01-06 15:30:57 +0200
committerMavridis Philippe <mavridisf@gmail.com>2023-03-24 15:28:11 +0200
commita67db2d4847d798c01d4fd7584c5bb9297e109e3 (patch)
tree6cb5bb70f6201fa62dec021b92e838d32a6036ec /kcontrol/keys
parentb50ab13974adf6f16d72f172f0cf768a44c161da (diff)
downloadtdebase-a67db2d4847d798c01d4fd7584c5bb9297e109e3.tar.gz
tdebase-a67db2d4847d798c01d4fd7584c5bb9297e109e3.zip
Kxkb: Improve layout switching
1) New layout switching approach The new approach is based on the "grp" options group of Xkb and so enables us to use predefined X11 layout (group) switching hotkeys like "Caps Lock" or "Shift+Alt" (you can see the full list in the Options tab). The added bonus to this is that we conform to the Xkb setting. The code lets Xkb handle the keyboard layout switching hotkey(s) and is similar to the one that is used in kkbswitch, monitoring for an Xkb group (layout) change event. This solution required me to remove some hacky and obsolete code which was there to support really old pre-XFree-4.2 era systems and included the "include groups" hack. This means that the "Enable latin layout" checkbox is now gone and setxkbmap is only called when the keyboard layouts and/or options are modified, and not for every layout change. 2) Common layout switching hotkeys combobox A combobox was added to the first page of the Keyboard Layouts KCM module. It provides to the users a quick way to set a layout switching key combination. It also controls the "grp" group in the Xkb tab. A special note about this combobox is that, even if Append Mode was selected in the Xkb Options tab, this hotkey will overwrite previous hotkey options. This means that all grp: options will be forced removed before applying the option from the combobox (in contrast to specifying options via the Xkb Options tab, which, in Append Mode, will not get overwritten until next login). Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kcontrol/keys')
-rw-r--r--kcontrol/keys/keyconfig.cpp2
-rw-r--r--kcontrol/keys/main.cpp1
-rw-r--r--kcontrol/keys/shortcuts.cpp1
3 files changed, 0 insertions, 4 deletions
diff --git a/kcontrol/keys/keyconfig.cpp b/kcontrol/keys/keyconfig.cpp
index ee39447a1..4ba5951dd 100644
--- a/kcontrol/keys/keyconfig.cpp
+++ b/kcontrol/keys/keyconfig.cpp
@@ -66,7 +66,6 @@ void KKeyModule::init( bool isGlobal, bool _bSeriesOnly, bool bSeriesNone )
#include "../../kicker/taskbar/taskbarbindings.cpp"
#include "../../kdesktop/kdesktopbindings.cpp"
#include "../../klipper/klipperbindings.cpp"
-#include "../../kxkb/kxkbbindings.cpp"
#undef TDEShortcuts
KeyScheme = "Global Key Scheme";
KeySet = "Global Keys";
@@ -489,7 +488,6 @@ void KKeyModule::init()
#include "../../kicker/kicker/core/kickerbindings.cpp"
#include "../../kicker/taskbar/taskbarbindings.cpp"
#include "../../kdesktop/kdesktopbindings.cpp"
-#include "../../kxkb/kxkbbindings.cpp"
#undef TDEShortcuts
kdDebug(125) << "KKeyModule::init() - Read Config Bindings\n";
diff --git a/kcontrol/keys/main.cpp b/kcontrol/keys/main.cpp
index d002b667f..53daa462e 100644
--- a/kcontrol/keys/main.cpp
+++ b/kcontrol/keys/main.cpp
@@ -190,7 +190,6 @@ extern "C"
#include "../../kicker/kicker/core/kickerbindings.cpp"
#include "../../kicker/taskbar/taskbarbindings.cpp"
#include "../../kdesktop/kdesktopbindings.cpp"
-#include "../../kxkb/kxkbbindings.cpp"
// Write all the global keys to kdeglobals.
// This is needed to be able to check for conflicts with global keys in app's keyconfig
diff --git a/kcontrol/keys/shortcuts.cpp b/kcontrol/keys/shortcuts.cpp
index e7f599dda..e350b1e22 100644
--- a/kcontrol/keys/shortcuts.cpp
+++ b/kcontrol/keys/shortcuts.cpp
@@ -116,7 +116,6 @@ void ShortcutsModule::initGUI()
#include "../../kicker/taskbar/taskbarbindings.cpp"
#include "../../kdesktop/kdesktopbindings.cpp"
#include "../../klipper/klipperbindings.cpp"
-#include "../../kxkb/kxkbbindings.cpp"
kdDebug(125) << "B-----------" << endl;
m_actionsSequence.init( m_actionsGeneral );