input-remapper icon indicating copy to clipboard operation
input-remapper copied to clipboard

bug to Release Input ?

Open Oh-noodles opened this issue 2 years ago • 1 comments

I mapped Alt_L to KEY_LEFTCTRL, so that I can use Alt_L + A to select all, Alt_L + C to copy, Alt_L + V to paste. very nice.

Then, I mapped Alt_L + I/J/K/L to arrow keys. But it does not work as I expected. Alt_L + J for instance, not behaves as ⬅️, but Ctrl_L + ⬅️ . Which means Ctrl_L (mapped from Alt_L) was hold.

Release Input was turned on to all these mappings.

Is it a bug? I mean since the Release Input option was turned on, Alt_L should not be mapped to Ctrl_L and kept hold. If it was expected, did I missed any approach to achieve my requirement? 🤔️

Oh-noodles avatar Nov 23 '23 09:11 Oh-noodles

Did you find any solution?

For me its also buggy, can you try the example provided in docs and tell its behaviour https://github.com/sezanzeb/input-remapper/blob/main/readme/usage.md#combinations

Consider a mapping Shift+1 -> a this will inject a lowercase a if the toggle is on and an uppercase A if it is off. The exact behaviour if the toggle is off is dependent on keys (are modifiers involved?), the order in which they are pressed and on your environment (X11/Wayland). By default the toggle is on.

For me Shift+1 were outputting a regardless of states of Release input toggle.

KAGEYAM4 avatar Oct 12 '24 01:10 KAGEYAM4

Try

  • Alt_L -> KEY_LEFTCTRL
  • Alt_L + J -> key_up(KEY_LEFTCTRL).hold_keys(KEY_LEFT)
  • Alt_L + L -> key_up(KEY_LEFTCTRL).hold_keys(KEY_RIGHT)
  • and so on

This should release the control key that got injected by Alt_L

I think an argument can be made for an against the current behavior of Release Input. In this case, there is luckily an easy workaround, so I think this issue can be closed.

sezanzeb avatar Dec 29 '24 18:12 sezanzeb