Skip to content

Commit

Permalink
Fixed an issue that the fn key is unintentionally tapped when use the…
Browse files Browse the repository at this point in the history
… media keys if "Use all F1, F2, etc. keys as standard function keys" is enabled.
  • Loading branch information
tekezo committed Nov 21, 2024
1 parent 837ea09 commit 6e7d676
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- 🐛 Bug Fixes
- Fixed an overflow issue with the mouse key movements.
- Fixed an issue that the fn key is unintentionally tapped when use the media keys if "Use all F1, F2, etc. keys as standard function keys" is enabled.
- ⚡️ Improvements
- Support the following keys:
- consumer::ac_zoom_out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,27 @@ class fn_function_keys_manipulator_manager final {
}
}

// When we change fn+f10 to mute, directly mapping fn+f10 to mute will result in the following events being sent:
//
// - input: fn keydown
// - output: fn keydown
// - input: f10 keydown
// - output: fn keyup
// - output: mute keydown
// - input: fn10 keyup
// - output: mute keyup
// - input: fn keyup
// - output: none
//
// In this case, the fn key is unintentionally tapped.
// To avoid this, fn+f10 should be remapped to fn+mute instead.

if (from_mandatory_modifiers_fn) {
if (!j["modifiers"].contains("fn")) {
j["modifiers"].push_back("fn");
}
}

to_event_definitions.emplace_back(j);
}

Expand Down

0 comments on commit 6e7d676

Please sign in to comment.