Skip to content

Commit

Permalink
#1343 Windows: Fix bug that prevented entering the letter "p" in ReaL…
Browse files Browse the repository at this point in the history
…earn text fields
  • Loading branch information
helgoboss committed Dec 2, 2024
1 parent 8c071c6 commit 07632e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main/src/domain/accelerator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ where

/// Decides what to do with the key if no main processor used it.
fn process_unmatched(&self, msg: AccelMsg) -> TranslateAccelResult {
if msg.behavior().contains(AcceleratorBehavior::VirtKey)
let is_virt_key = msg.message() != AccelMsgKind::Char && msg.behavior().contains(AcceleratorBehavior::VirtKey);
if is_virt_key
&& msg.key().get() as u32 == raw::VK_ESCAPE
{
// Don't process escape in special ways. We want the normal close behavior. Especially
Expand All @@ -86,7 +87,7 @@ where
};
// Support F1 in our windows (key_down and key_up don't work very well on Linux and Windows if there's
// a text field)
if msg.key().get() == virt_keys::F1.get() {
if is_virt_key && msg.key().get() == virt_keys::F1.get() {
if msg.message() == AccelMsgKind::KeyUp {
view.help_requested();
}
Expand Down

0 comments on commit 07632e8

Please sign in to comment.