XKB: creating new type fails
I thought I understood XKB, but apparently not... So first I have a question that make me unable to debug XKB: I have in a file (obtain with xkbcomp $DISPLAY output.xkb) a part like that:
type "FOUR_LEVEL_MIXED_KEYPAD" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
I would like first to create a copy of this type, so I copy pasted right below the same item with a different title:
type "FOUR_LEVEL_MIXED_KEYPAD_CUS" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
and I changed the line
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
into
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD_CUS",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
(i.e. I just changed the name of the type)
Then I reload the file using xkbcomp output.xkb $DISPLAY... And now the key 2 does not work as before (other keys are unchanged), and basically when I use no modified it's like if I press directly the down button, while before it was printing a number (NumLock is enabled). If I remove the _CUS in the name, then it works as before.
How is that possible, as the two types are supposed to be the same?
Full document: http://paste.debian.net/1063043
xkb
add a comment |
I thought I understood XKB, but apparently not... So first I have a question that make me unable to debug XKB: I have in a file (obtain with xkbcomp $DISPLAY output.xkb) a part like that:
type "FOUR_LEVEL_MIXED_KEYPAD" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
I would like first to create a copy of this type, so I copy pasted right below the same item with a different title:
type "FOUR_LEVEL_MIXED_KEYPAD_CUS" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
and I changed the line
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
into
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD_CUS",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
(i.e. I just changed the name of the type)
Then I reload the file using xkbcomp output.xkb $DISPLAY... And now the key 2 does not work as before (other keys are unchanged), and basically when I use no modified it's like if I press directly the down button, while before it was printing a number (NumLock is enabled). If I remove the _CUS in the name, then it works as before.
How is that possible, as the two types are supposed to be the same?
Full document: http://paste.debian.net/1063043
xkb
I cannot reproduce. The_CUStype works just the same for me, and theKP_Downworks similarly toKP_Up. You probably have something else going on there (xmodmap?)
– pizdelect
38 mins ago
add a comment |
I thought I understood XKB, but apparently not... So first I have a question that make me unable to debug XKB: I have in a file (obtain with xkbcomp $DISPLAY output.xkb) a part like that:
type "FOUR_LEVEL_MIXED_KEYPAD" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
I would like first to create a copy of this type, so I copy pasted right below the same item with a different title:
type "FOUR_LEVEL_MIXED_KEYPAD_CUS" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
and I changed the line
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
into
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD_CUS",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
(i.e. I just changed the name of the type)
Then I reload the file using xkbcomp output.xkb $DISPLAY... And now the key 2 does not work as before (other keys are unchanged), and basically when I use no modified it's like if I press directly the down button, while before it was printing a number (NumLock is enabled). If I remove the _CUS in the name, then it works as before.
How is that possible, as the two types are supposed to be the same?
Full document: http://paste.debian.net/1063043
xkb
I thought I understood XKB, but apparently not... So first I have a question that make me unable to debug XKB: I have in a file (obtain with xkbcomp $DISPLAY output.xkb) a part like that:
type "FOUR_LEVEL_MIXED_KEYPAD" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
I would like first to create a copy of this type, so I copy pasted right below the same item with a different title:
type "FOUR_LEVEL_MIXED_KEYPAD_CUS" {
modifiers= Shift+NumLock+LevelThree;
map[Shift+NumLock]= Level1;
map[NumLock]= Level2;
map[Shift]= Level2;
map[LevelThree]= Level3;
map[NumLock+LevelThree]= Level3;
map[Shift+LevelThree]= Level4;
map[Shift+NumLock+LevelThree]= Level4;
level_name[Level1]= "Base";
level_name[Level2]= "Number";
level_name[Level3]= "Alt Base";
level_name[Level4]= "Shift Alt";
};
and I changed the line
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
into
key <KP2> {
type= "FOUR_LEVEL_MIXED_KEYPAD_CUS",
symbols[Group1]= [ KP_Down, KP_2, U2193, U21D3 ]
};
(i.e. I just changed the name of the type)
Then I reload the file using xkbcomp output.xkb $DISPLAY... And now the key 2 does not work as before (other keys are unchanged), and basically when I use no modified it's like if I press directly the down button, while before it was printing a number (NumLock is enabled). If I remove the _CUS in the name, then it works as before.
How is that possible, as the two types are supposed to be the same?
Full document: http://paste.debian.net/1063043
xkb
xkb
asked 1 hour ago
tobiasBoratobiasBora
249211
249211
I cannot reproduce. The_CUStype works just the same for me, and theKP_Downworks similarly toKP_Up. You probably have something else going on there (xmodmap?)
– pizdelect
38 mins ago
add a comment |
I cannot reproduce. The_CUStype works just the same for me, and theKP_Downworks similarly toKP_Up. You probably have something else going on there (xmodmap?)
– pizdelect
38 mins ago
I cannot reproduce. The
_CUS type works just the same for me, and the KP_Down works similarly to KP_Up. You probably have something else going on there (xmodmap?)– pizdelect
38 mins ago
I cannot reproduce. The
_CUS type works just the same for me, and the KP_Down works similarly to KP_Up. You probably have something else going on there (xmodmap?)– pizdelect
38 mins ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497316%2fxkb-creating-new-type-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497316%2fxkb-creating-new-type-fails%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I cannot reproduce. The
_CUStype works just the same for me, and theKP_Downworks similarly toKP_Up. You probably have something else going on there (xmodmap?)– pizdelect
38 mins ago