summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorSergey Udaltsov <svu@linnie-the-pooh.(none)>2008-10-11 22:45:36 +0100
committerSergey Udaltsov <svu@linnie-the-pooh.(none)>2008-10-11 22:45:36 +0100
commitee77f697ab187e913bc5aa16e4abb62179798501 (patch)
tree33ff2786796b51eac8490a43c1b741af208f446d /types
parent4186d1a362721d0404dbf3861fe0e18546305d64 (diff)
added numpad:shift3 option, b.fd.o#17110
Diffstat (limited to 'types')
-rw-r--r--types/numpad32
1 files changed, 32 insertions, 0 deletions
diff --git a/types/numpad b/types/numpad
index 335e20bb..cb863b3f 100644
--- a/types/numpad
+++ b/types/numpad
@@ -38,3 +38,35 @@ partial xkb_types "microsoft" {
include "extra(keypad)"
};
+// Swiss-German style numeric keypad: Shift and NumLock operates as
+// two independent modifiers; however, since we want shift state for
+// the cursor keys, only three levels are used from the key mappings.
+// Closest type is actually FOUR_LEVEL_X, but most numpad layouts uses
+// FOUR_LEVEL_MIXED_KEYPAD so that's the one we are going to override.
+partial xkb_types "shift3" {
+ type "FOUR_LEVEL_MIXED_KEYPAD" {
+ modifiers = Shift+NumLock+Control+Alt;
+
+ // NumLock Off => navigate using cursor keys
+ map[None] = Level1;
+
+ // NumLock Off + Shift pressed => select using cursor keys
+ preserve[Shift] = Shift;
+
+ // NumLock On => decimal digits
+ map[NumLock] = Level2;
+
+ // NumLock On + Shift pressed => auxiliary symbols,
+ // e.g. hexadecimal digits
+ map[Shift+NumLock] = Level3;
+
+ // Ctrl + Alt, regardless of NumLock and Shift => command keys
+ map[Control+Alt] = Level4;
+
+ // reverse map from levels to modifiers
+ level_name[Level1] = "Base";
+ level_name[Level2] = "NumLock";
+ level_name[Level3] = "Shift+NumLock";
+ level_name[Level4] = "Ctrl+Alt";
+ };
+};