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

Right control button is detected as the left control button #2009

Closed
Pixel-Minions opened this issue May 19, 2022 · 18 comments
Closed

Right control button is detected as the left control button #2009

Pixel-Minions opened this issue May 19, 2022 · 18 comments
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. keyboard Keyboard mapping/handling Windows Issue applies to Microsoft Windows

Comments

@Pixel-Minions
Copy link

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

Windows

WezTerm version

20220408-101518-b908e2dd

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

No, and I'll explain why below

Describe the bug

Currently, when I am using Far manager, I loved Wezterm but the right control button is not been detected independently which is needed so much to move between favorite groups.

Is it possible to register that key differently from the left control one?

To Reproduce

No response

Configuration

local wezterm = require 'wezterm';

return {
disable_default_key_bindings = true,
allow_win32_input_mode = true,
}

Expected Behavior

No response

Logs

No response

Anything else?

No response

@Pixel-Minions Pixel-Minions added the bug Something isn't working label May 19, 2022
@wez
Copy link
Owner

wez commented May 19, 2022

Sounds like a duplicate of #1904
Could you open an issue with the MS folks as I requested at the bottom of that other issue?

@wez wez added the waiting-on-op Waiting for more information from the original poster label May 20, 2022
@Pixel-Minions
Copy link
Author

@wez microsoft/terminal#13134 I hope I did it okey enough to move this forward.

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label May 20, 2022
@wez
Copy link
Owner

wez commented May 20, 2022

Thanks!

@wez
Copy link
Owner

wez commented May 22, 2022

I pushed a commit that fixes the main issue behind the other win32 input mode bugs reported to wezterm, where CTRL- wasn't correctly reported.

Could you try that and let me know if that resolves what you're seeing with the left/right ctrl key issue?

wezterm doesn't track a distinct left/right ctrl modifier mask (because that concept isn't part of the classic terminal model), but if you're pressing just the left/right ctrl key (and not using it as a modifier) it should pass through the underlying vkey code.

It typically takes about an hour before fixes are available as nightly builds for all platforms. Linux builds are the fastest to build and are often available within about 20 minutes. Windows and macOS builds take a bit longer.

Please take a few moments to try out the fix and let me know how that works out.

If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg file on macOS, a .zip file on Windows and an .AppImage file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.

If you are eager and can build from source then you may be able to try this out more quickly.

@Pixel-Minions
Copy link
Author

The issue is still present with this nighty version

image

@wez
Copy link
Owner

wez commented May 26, 2022

Can you clarify for me what key(s) you're pressing in this situation?
Is it the right control key on its own, or are you holding the right control key together with some other key?

@wez
Copy link
Owner

wez commented May 26, 2022

Could you also turn on debug_key_events=true and capture the logs from the keys that you're pressing; see: https://wezfurlong.org/wezterm/config/lua/config/debug_key_events.html for more information on that.

@wez wez added the waiting-on-op Waiting for more information from the original poster label May 26, 2022
wez added a commit that referenced this issue May 26, 2022
I think this might only be a thing on Windows.

This commit speculatively (I'm on a mac at the moment!) allows tracking
the left/right control/shift modifier flags and passing that through
to the win32 input mode logic.

refs: #2009
wez added a commit that referenced this issue May 26, 2022
I overlooked this as part of e83f2c9
The positional mods need to be stripped out when looking up keymap
assignments, so let's do that.

refs: #2009
refs: #2037
@Pixel-Minions
Copy link
Author

westerm_log.txt

Yes, for Far, we use a left control + a number for example to change the panels and right control + a number to navigate to favourites. That is why is important the distinction.

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label May 26, 2022
@wez
Copy link
Owner

wez commented May 26, 2022

Can you try downloading the latest nightly build? I landed a change that might help

@Pixel-Minions
Copy link
Author

image

Works man!, that is great!

@Pixel-Minions
Copy link
Author

One more note, the control + up key is not working. I was wondering if this might be related.

@wez
Copy link
Owner

wez commented May 26, 2022

Can you show the debug key events logs for that key combo when you try it?

@Pixel-Minions
Copy link
Author

Pixel-Minions commented May 26, 2022

westerm_log2.txt

@wez

@Pixel-Minions
Copy link
Author

Hi @wez do you think it is possible?

@wez wez added the Windows Issue applies to Microsoft Windows label Jun 5, 2022
@wez
Copy link
Owner

wez commented Jun 5, 2022

Asking over in microsoft/terminal#13134 (comment)

@wez wez added the fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. label Jun 8, 2022
@wez
Copy link
Owner

wez commented Jun 8, 2022

I think this is fixed now in main! It can take up to an hour before this will be in the windows nightly build.

@Pixel-Minions
Copy link
Author

Yes!, it is working man, this is fantastic!

wez added a commit that referenced this issue Jun 9, 2022
@wez wez added the keyboard Keyboard mapping/handling label Jun 15, 2022
@wez wez closed this as completed Jun 15, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed-in-nightly This is (or is assumed to be) fixed in the nightly builds. keyboard Keyboard mapping/handling Windows Issue applies to Microsoft Windows
Projects
None yet
Development

No branches or pull requests

2 participants