keyboard.rs: Format code better

Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/695>
This commit is contained in:
MoonlightWave-12
2024-11-04 14:47:47 +01:00
parent 1a899f6b77
commit 04b6e07b61

View File

@ -251,10 +251,8 @@ pub fn generate_keycodes<'a, C: IntoIterator<Item=String>>(
if name == "Pause" { code = KEY_PAUSE + keycode_offset; keymap_idx = 0 }
if name == "Return" { code = KEY_ENTER + keycode_offset; keymap_idx = 0 }
if name == "Tab" { code = KEY_TAB + keycode_offset; keymap_idx = 0 }
(
String::from(name),
KeyCode { code, keymap_idx },
)})
(String::from(name), KeyCode { code, keymap_idx })
}),
);
// Workaround: BackSpace does not work with `tools/entry.py` (made with GTK3),
// if the keymap with BackSpace does not contain any other keycodes.