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

Emacs alt-v keybinding triggering solo Alt key in firefox #446

Open
anaxonda opened this issue Mar 24, 2024 · 6 comments
Open

Emacs alt-v keybinding triggering solo Alt key in firefox #446

anaxonda opened this issue Mar 24, 2024 · 6 comments

Comments

@anaxonda
Copy link

One minor thing...

I'm using the provided emacs keybindings. In Firefox when I use alt-v (page-up), page-up does successfully work, but it also triggers a solo alt press (open menu).

Is there any way to separate an alt pressed separately with one thats part of a key sequence?

@k0kubun
Copy link
Contributor

k0kubun commented Mar 25, 2024

You could try the virtual_modifiers feature, or use Super instead of Alt. I personally use the latter method myself for this exact problem.

@anaxonda
Copy link
Author

You use Super systemwide in lieu of Alt (except in emacs I guess)? Or just in firefox?

Is there any way to make Alt behave as normal Alt when pressed singly, and ignored when held?

@k0kubun
Copy link
Contributor

k0kubun commented Apr 27, 2024

Yes. This is what you said:

modmap:
  - remap:
      Alt_L:
        held: KEY_UNKNOWN
        alone: Alt_L

but I think you want to put Alt_L in held and Unknown in alone?

@anhhon
Copy link

anhhon commented May 19, 2024

Yes. This is what you said:

modmap:
  - remap:
      Alt_L:
        held: KEY_UNKNOWN
        alone: Alt_L

but I think you want to put Alt_L in held and Unknown in alone?

I use virtual_modifiers with Alt_R and modmap: Alt_R in held and Unknown in alone does work but after using a keybinding such as Alt_R-j for left arrow, I cannot type anything. It behave like the Alt_R is stuck or always pressed.

@k0kubun
Copy link
Contributor

k0kubun commented May 20, 2024

Can you run xremap with RUST_LOG=debug xremap, reproduce the problem, stop xremap, and share the entire output of the xremap command and the config YAML file?

@anhhon
Copy link

anhhon commented May 21, 2024

Here is the output after I run xremap with debug:

[2024-05-21T04:54:45Z DEBUG xremap::event_handler] => 0: KEY_ENTER
[2024-05-21T04:54:45Z DEBUG xremap::action_dispatcher] 0: KEY_ENTER
[2024-05-21T04:54:55Z DEBUG xremap::event_handler] => 1: KEY_RIGHTALT
[2024-05-21T04:54:55Z DEBUG xremap::event_handler] => 1: KEY_I
[2024-05-21T04:54:55Z DEBUG xremap::action_dispatcher] 0: KEY_RIGHTALT
[2024-05-21T04:54:55Z DEBUG xremap::action_dispatcher] 1: KEY_UP
[2024-05-21T04:54:55Z DEBUG xremap::action_dispatcher] 0: KEY_UP
[2024-05-21T04:54:55Z DEBUG xremap::action_dispatcher] 1: KEY_RIGHTALT
[2024-05-21T04:54:55Z DEBUG xremap::event_handler] => 0: KEY_I
[2024-05-21T04:54:55Z DEBUG xremap::action_dispatcher] 0: KEY_I
[2024-05-21T04:54:55Z DEBUG xremap::event_handler] => 0: KEY_RIGHTALT
[2024-05-21T04:55:00Z DEBUG xremap::event_handler] => 1: KEY_I
[2024-05-21T04:55:00Z DEBUG xremap::action_dispatcher] 1: KEY_I
[2024-05-21T04:55:00Z DEBUG xremap::event_handler] => 0: KEY_I
[2024-05-21T04:55:00Z DEBUG xremap::action_dispatcher] 0: KEY_I
[2024-05-21T04:55:01Z DEBUG xremap::event_handler] => 1: KEY_A
[2024-05-21T04:55:01Z DEBUG xremap::action_dispatcher] 1: KEY_A
[2024-05-21T04:55:01Z DEBUG xremap::event_handler] => 0: KEY_A
[2024-05-21T04:55:01Z DEBUG xremap::action_dispatcher] 0: KEY_A
[2024-05-21T04:55:02Z DEBUG xremap::event_handler] => 1: KEY_A
[2024-05-21T04:55:02Z DEBUG xremap::action_dispatcher] 1: KEY_A
[2024-05-21T04:55:02Z DEBUG xremap::event_handler] => 0: KEY_A
[2024-05-21T04:55:02Z DEBUG xremap::action_dispatcher] 0: KEY_A
[2024-05-21T04:55:03Z DEBUG xremap::event_handler] => 1: KEY_A
[2024-05-21T04:55:03Z DEBUG xremap::action_dispatcher] 1: KEY_A
[2024-05-21T04:55:03Z DEBUG xremap::event_handler] => 0: KEY_A
[2024-05-21T04:55:03Z DEBUG xremap::action_dispatcher] 0: KEY_A
[2024-05-21T04:55:05Z DEBUG xremap::event_handler] => 1: KEY_LEFTCTRL
[2024-05-21T04:55:05Z DEBUG xremap::action_dispatcher] 1: KEY_LEFTCTRL
[2024-05-21T04:55:05Z DEBUG xremap::event_handler] => 1: KEY_C
[2024-05-21T04:55:05Z DEBUG xremap::action_dispatcher] 1: KEY_C

This is my YAML file content:

virtual_modifiers:
  - Alt_R

keymap:
  - remap:
      Alt_R-i: Up
      Alt_R-j: Left
      Alt_R-k: Down
      Alt_R-l: Right

      Alt_L-Alt_R-i: KEY_PAGEUP
      Alt_L-Alt_R-j: Home
      Alt_L-Alt_R-k: KEY_PAGEDOWN
      Alt_L-Alt_R-l: End
    
      Shift_L-Alt_L-Alt_R-i: Shift_L-KEY_PAGEUP
      Shift_L-Alt_L-Alt_R-j: Shift_L-Home
      Shift_L-Alt_L-Alt_R-k: Shift_L-KEY_PAGEDOWN
      Shift_L-Alt_L-Alt_R-l: Shift_L-End

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants