From 45262c3091d3d47b0116d9f45dfc5e6f61de6239 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 27 Apr 2021 07:38:19 -0700 Subject: [PATCH] macos: fix numpad enter key reporting refs: https://github.com/wez/wezterm/issues/739 --- docs/changelog.md | 1 + window/src/os/macos/window.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 282a71513..e1cb0f381 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -48,6 +48,7 @@ As features stabilize some brief notes about them will accumulate here. * New: [wezterm.column_width](config/lua/wezterm/column_width.md) function for measuring the displayed width of a string * New: [wezterm.truncate_to_width](config/lua/wezterm/truncate_to_width.md) and [wezterm.truncate_left_to_width](config/lua/wezterm/truncate_left_to_width.md) function for truncating/padding a string based on its displayed width * Updated bundled `Noto Color Emoji` font to version 2.020 with unicode 13.1 support. Thanks to [@4cm4k1](https://github.com/4cm4k1)! [#742](https://github.com/wez/wezterm/pull/742) +* Fixed: Numpad Enter reported as CTRL-C on macOS [#739](https://github.com/wez/wezterm/issues/739) ### 20210405-110924-a5bb5be8 diff --git a/window/src/os/macos/window.rs b/window/src/os/macos/window.rs index 6f44e80c8..2405c7d4f 100644 --- a/window/src/os/macos/window.rs +++ b/window/src/os/macos/window.rs @@ -1664,6 +1664,11 @@ impl WindowView { "\t" } else if !use_ime && virtual_key == super::keycodes::kVK_Delete { "\x08" + } else if virtual_key == super::keycodes::kVK_ANSI_KeypadEnter { + // https://github.com/wez/wezterm/issues/739 + // Keypad enter sends ctrl-c for some reason; explicitly + // treat that as enter here. + "\r" } else { unmod };