test/x11comp: remove duplicate FOUR_LEVEL_KEYPAD from test keymap The `test/data/keymaps/host.xkb` file contains a duplicate definition of this type. On my computer (linux, xkbcomp 1.3.0, xserver 1.17.2), the test passes as is, but if I remove the duplicate definition, the roundtrip brings it back and the test fails. I can also reproduce it without relation to the test, by loading `test/data/keymaps/host.xkb` (without the duplicate) using xkbcomp -I $(pwd)/test/data/keymaps/host.xkb $DISPLAY and downloading it again using xkbcomp $DISPLAY out.xkb the duplicate is added. On Mac OS X however, the duplicate is removed (correctly), so the test fails there. xkbcommon itself, which was forked from xkbcomp, doesn't have this bug; in fact, doing ./test/print-compiled-keymap -k keymaps/host.xkb removes the duplicate if it is present. This is (probably) a regression in xkbcomp or xserver compared to the versions used in Mac OS X. Since getting a patch for any of these two is hopeless from my experience, I did not try to investigate further. I am not sure why, but if I also add a `PC_SUPER_LEVEL2` type, the duplicate of `FOUR_LEVEL_KEYPAD` doesn't show up. Hopefully the test will work on all platforms now. https://github.com/xkbcommon/libxkbcommon/issues/26 Reported-by: @nuko8 Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/test/data/keymaps/host.xkb b/test/data/keymaps/host.xkb
index 3b10467..c7d606f 100644
--- a/test/data/keymaps/host.xkb
+++ b/test/data/keymaps/host.xkb
@@ -328,6 +328,12 @@ xkb_types "complete" {
level_name[Level1]= "Base";
level_name[Level2]= "Shift+Alt";
};
+ type "PC_SUPER_LEVEL2" {
+ modifiers= Mod4;
+ map[Mod4]= Level2;
+ level_name[Level1]= "Base";
+ level_name[Level2]= "Super";
+ };
type "PC_CONTROL_LEVEL2" {
modifiers= Control;
map[Control]= Level2;
@@ -589,19 +595,6 @@ xkb_types "complete" {
level_name[Level3]= "Alt Base";
level_name[Level4]= "Alt Number";
};
- type "FOUR_LEVEL_KEYPAD" {
- modifiers= Shift+NumLock+LevelThree;
- map[Shift]= Level2;
- map[NumLock]= Level2;
- map[LevelThree]= Level3;
- map[Shift+LevelThree]= Level4;
- map[NumLock+LevelThree]= Level4;
- map[Shift+NumLock+LevelThree]= Level3;
- level_name[Level1]= "Base";
- level_name[Level2]= "Number";
- level_name[Level3]= "Alt Base";
- level_name[Level4]= "Alt Number";
- };
};
xkb_compatibility "complete" {