Skip to content

Commit

Permalink
fix(unmod): swap alt/meta mappings (#1180)
Browse files Browse the repository at this point in the history
The unmod example at
https://github.com/jtroo/kanata/blob/main/docs/config.adoc#unmod doesn't
work, this fixes it.
  • Loading branch information
rutgersc authored Aug 4, 2024
1 parent 70c6e21 commit e570669
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/kanata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,12 +955,12 @@ impl Kanata {
let kc = match mod_key {
UnmodMods::LSft => KeyCode::LShift,
UnmodMods::RSft => KeyCode::RShift,
UnmodMods::LAlt => KeyCode::LGui,
UnmodMods::RAlt => KeyCode::RGui,
UnmodMods::LAlt => KeyCode::LAlt,
UnmodMods::RAlt => KeyCode::RAlt,
UnmodMods::LCtl => KeyCode::LCtrl,
UnmodMods::RCtl => KeyCode::RCtrl,
UnmodMods::LMet => KeyCode::LAlt,
UnmodMods::RMet => KeyCode::RAlt,
UnmodMods::LMet => KeyCode::LGui,
UnmodMods::RMet => KeyCode::RGui,
_ => unreachable!("all bits of u8 should be covered"), // test_unmodmods_bits
};
cur_keys.retain(|k| *k != kc);
Expand Down

0 comments on commit e570669

Please sign in to comment.