Unexpected-Keyboard
Unexpected-Keyboard copied to clipboard
How to add ctrl+b (tmux prefix) in custom layout?
Hello,
Thanks for the great keyboard, how can I add combination keys (modifiers + regular key) in custom layout like <key key0="ctrl+b"/>
(and display as "tmux")?
That's a reasonable request. The quoted string can include multiple keystrokes (without +
) but I don't know of a way to specify modified characters. As for the legend, @Julow has said he wants to keep layout separate from appearance, suggesting that if he provides this feature, it would not be with new syntax in the layout file.
This is a good idea! A key is currently represented as an object with two fields: https://github.com/Julow/Unexpected-Keyboard/blob/master/srcs/juloo.keyboard2/KeyValue.java#L130-L133, which makes a 3 words object. Adding anything to this object will add a word to it. This is not a bad deal but we must make sure not to add too much and it might requires some wider changes.
As for the legend, @Julow has said he wants to keep layout separate from appearance, suggesting that if he provides this feature, it would not be with new syntax in the layout file.
You are mixing appearance of symbols (which is a property of the symbol) and appearance of the keyboard (which is defined in a theme that is separate from layouts).
Pleased to be corrected! The KeyValue.java piece seems to be an existing variable that holds the keycap legend; all you need is XML syntax to specify a custom one.
I asked for custom legends in an off-topic comment in #483. (What OP @ghost requested there is already doable; also, now, the Compose feature.)