From b0543d3f934980afe44b072ed4e9ec639104624e Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Sat, 25 Sep 2021 02:04:34 -0400 Subject: [PATCH] noop other identical keys --- src/keymapper.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keymapper.rs b/src/keymapper.rs index e4f125d..9466b8c 100644 --- a/src/keymapper.rs +++ b/src/keymapper.rs @@ -169,7 +169,9 @@ impl KeyMaps let mut keymap = CodeKeyMap::new(); let mut i: usize = 0; for key_code in v { - keymap.map(base_keymap[i], key_code); + if base_keymap[i] != key_code { + keymap.map(base_keymap[i], key_code); + } i = i + 1; if i > base_keymap.len() { panic!("all keymaps must be the same length, keymap index 0 length: {}, index {} length: {},", base_keymap.len(), x, i);