summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
authorPierre Le Marre <dev@wismill.eu>2025-01-10 09:35:56 +0100
committerPierre Le Marre <dev@wismill.eu>2025-01-10 11:58:14 +0100
commit5f12a603e2936a4aa3ea4c08f000392a0d01adae (patch)
tree4a8f0971088526795b7e6609232e68a504def164 /types
parentd9eda056c26e0be891d0f66850057358c89183e5 (diff)
Use explicit virtual modifiers declarations
A virtual modifier should always be declared before its use. They are a few missing entries, that currently work only because they are not used in isolation. But since XKB is about composability, we should ensure that every component compiles in isolation, so this commit adds the missing `virtual_modifiers` entries. Part-of: <https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/merge_requests/796>
Diffstat (limited to 'types')
-rw-r--r--types/caps8
-rw-r--r--types/extra2
-rw-r--r--types/level52
-rw-r--r--types/numpad6
4 files changed, 16 insertions, 2 deletions
diff --git a/types/caps b/types/caps
index 0101b32c..1ccc8c57 100644
--- a/types/caps
+++ b/types/caps
@@ -1,6 +1,8 @@
// CapsLock uses internal capitalization rules,
// Shift "pauses" CapsLock.
partial xkb_types "internal" {
+ virtual_modifiers LevelThree;
+
type "ALPHABETIC" {
modifiers = Shift + Lock;
map[Shift] = Level2;
@@ -46,6 +48,8 @@ partial xkb_types "internal" {
// CapsLock uses internal capitalization rules,
// Shift does not cancel CapsLock.
partial xkb_types "internal_nocancel" {
+ virtual_modifiers LevelThree;
+
type "ALPHABETIC" {
modifiers = Shift;
map[Shift] = Level2;
@@ -82,6 +86,8 @@ partial xkb_types "internal_nocancel" {
// CapsLock acts as Shift with locking,
// Shift "pauses" CapsLock.
partial xkb_types "shift" {
+ virtual_modifiers LevelThree;
+
type "ALPHABETIC" {
modifiers = Shift + Lock;
map[Shift] = Level2;
@@ -126,6 +132,8 @@ partial xkb_types "shift" {
// CapsLock acts as Shift with locking,
// Shift does not cancel CapsLock.
partial xkb_types "shift_nocancel" {
+ virtual_modifiers LevelThree;
+
type "ALPHABETIC" {
modifiers = Shift + Lock;
map[Shift] = Level2;
diff --git a/types/extra b/types/extra
index 299fe14a..8b3d6a06 100644
--- a/types/extra
+++ b/types/extra
@@ -3,7 +3,7 @@ default partial xkb_types "default" {
// Defines types with a four-level shift, similar to the three-level
// type from iso9995, but they let the Shift key behave "normally".
- virtual_modifiers LevelThree, LevelFive;
+ virtual_modifiers Alt, LevelThree, LevelFive, NumLock;
type "FOUR_LEVEL" {
modifiers = Shift + LevelThree;
diff --git a/types/level5 b/types/level5
index 71152fdc..da97c0d2 100644
--- a/types/level5
+++ b/types/level5
@@ -3,7 +3,7 @@ default partial xkb_types "default" {
// Defines types with an eight-level shift, similar to the three-level
// type used for iso9995, but it lets the Shift key behave "normally".
- virtual_modifiers LevelThree, LevelFive;
+ virtual_modifiers LevelThree, LevelFive, NumLock;
type "EIGHT_LEVEL" {
modifiers = Shift + LevelThree + LevelFive;
diff --git a/types/numpad b/types/numpad
index 8d7677a6..72bfb542 100644
--- a/types/numpad
+++ b/types/numpad
@@ -1,4 +1,6 @@
default partial xkb_types "pc" {
+ virtual_modifiers NumLock;
+
type "KEYPAD" {
modifiers = Shift + NumLock;
map[None] = Level1;
@@ -19,6 +21,8 @@ partial xkb_types "mac" {
};
partial xkb_types "microsoft" {
+ virtual_modifiers NumLock;
+
type "KEYPAD" {
modifiers = Shift + NumLock;
map[None] = Level1;
@@ -35,6 +39,8 @@ partial xkb_types "microsoft" {
// Closest type is actually FOUR_LEVEL_X, but most numpad layouts use
// FOUR_LEVEL_MIXED_KEYPAD, so that's the one we are going to override.
partial xkb_types "shift3" {
+ virtual_modifiers Alt, NumLock;
+
type "FOUR_LEVEL_MIXED_KEYPAD" {
modifiers = Shift + NumLock + Control + Alt;