wayland: keyboard: skip duplicate key symbols in layout
This has no implications right now.
This commit is contained in:
parent
9ec712bb69
commit
eb61256b2c
1 changed files with 5 additions and 0 deletions
|
|
@ -154,6 +154,7 @@ impl Keyboard for VirtualKeyboard {
|
|||
self.keymap.write(b"xkb_keymap {\n").unwrap();
|
||||
self.keymap.write(b" xkb_symbols \"ufkbd\" {\n").unwrap();
|
||||
|
||||
self.keycodes.clear();
|
||||
for row in layout.rows() {
|
||||
for key in row {
|
||||
for part in &key.parts {
|
||||
|
|
@ -161,6 +162,10 @@ impl Keyboard for VirtualKeyboard {
|
|||
continue;
|
||||
}
|
||||
|
||||
if self.keycodes.contains_key(&part.sym()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
self.keycodes.insert(part.sym(), keycode - 8);
|
||||
self.write_key(part, keycode);
|
||||
keycode += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue