Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS - CapsLock, Shift, Control, fn, option, cmd not logged by debug view #6112

Open
yorschor opened this issue Sep 9, 2024 · 3 comments
Open
Labels
bug Something isn't working macOS Issue applies to Apple macOS

Comments

@yorschor
Copy link

yorschor commented Sep 9, 2024

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240812-215703-30345b36

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I tried configuring CapsLock as the leader key as i have done on windows but i cant get it to even show when I enable "config.debug_key_events"
I would assume that I would see the raw/physical input logged here?
Mind me this is MacOS Sequoia 24A5331b. I don´t know if that makes any difference.

I tried around with use_ime among others.
I also made sure that the keys work otherwise. Karabiner elements Event viewer logs everything normally

To Reproduce

  1. Install Wezterm
  2. set config.debug_key_events = true in the config file
  3. Press one of the following keys "CapsLock, Shift, Ctrl, Option, CMD"

Configuration

local wezterm = require("wezterm")
local config = {}
local act = wezterm.action

if wezterm.config_builder then
config = wezterm.config_builder()
end
...
config.debug_key_events = true
...
config.animation_fps=60
return config

Expected Behavior

I would expect that all keys emit at least a physical/raw keyevent so that the can be used.

Logs

No response

Anything else?

No response

@yorschor yorschor added the bug Something isn't working label Sep 9, 2024
@wez wez added the macOS Issue applies to Apple macOS label Sep 15, 2024
@yorschor
Copy link
Author

Update: It seems to be the same for me on the release version of MacOS Sequoia.

@clombion
Copy link

clombion commented Nov 19, 2024

On a MBP M4 with Sequoia 15.1 I have the same issue.
I have been trying to make this work

config.keys = {
  -- Clears the scrollback and viewport leaving the prompt line the new first line.
  {
    key = 'K',
    mods = 'CMD',
    action = act.ClearScrollback 'ScrollbackAndViewport',
  }
}

but nothing happens, although the action works on the defaul terminal and CMD + V does correctly paste in Wezterm.

Enabled key logging, and noticed that CMD is not recognized at all. Doing CMD + V leads to a log where only the V is recognized

07:56:12.600  INFO   wezterm_gui::termwindow::keyevent > key_event RawKeyEvent { key: Char('v'), modifiers: NONE, leds: (empty), phys_code: Some(V), raw_code: 9, repeat_count: 1, key_is_down: false, handled: Handled(false) } 
07:56:12.600  INFO   wezterm_gui::termwindow::keyevent > key_event KeyEvent { key: Char('v'), modifiers: NONE, leds: (empty), repeat_count: 1, key_is_down: false, raw: Some(RawKeyEvent { key: Char('v'), modifiers: NONE, leds: (empty), phys_code: Some(V), raw_code: 9, repeat_count: 1, key_is_down: false, handled: Handled(false) }) } 
07:56:12.600  INFO   wezterm_gui::termwindow::keyevent > send to pane UP key=Char('v') mods=NONE

@vladkens
Copy link

vladkens commented Jan 9, 2025

@clombion I'm confused about this too. You should use lowercase k because K is actually SHIFT+K (key = k, mods = "SHIFT" is same as key = K).

This working as expected:

{ key = 'k', mods = 'CMD', action = wezterm.action.ClearScrollback 'ScrollbackAndViewport' }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Issue applies to Apple macOS
Projects
None yet
Development

No branches or pull requests

4 participants