houmain / keymapper

A cross-platform context-aware key remapper.
GNU General Public License v3.0
323 stars 25 forks source link

Need to re-press Alt when used in combination with certain keys #147

Closed rp1231 closed 6 months ago

rp1231 commented 6 months ago

I'm using keymapper in combination with komorebi, a tiling window manager. For keyboard shortcuts such as Alt + { Letter || Number Keys } I can just keep Alt pressed and the key combinations keep working fine. But when I have Alt pressed and then I press a key such as eg. Tab or the F row keys, I need to re-press the Alt key. Hope I've explained this well. Thanks

ristomatti commented 6 months ago

Post your config, otherwise it's difficult to debug. Please use a code block for formatting.

rp1231 commented 6 months ago

Here's my config:

Alt = AltLeft | AltRight

# Reload whkd configuration
(Alt Shift) O >> $(komorebic reload-configuration)

# focus windows with komorebi
Alt{H} >> $(komorebic focus left)
Alt{J} >> $(komorebic focus down)
Alt{K} >> $(komorebic focus up)
Alt{L} >> $(komorebic focus right)
(Alt Shift) BracketLeft     >> $(komorebic cycle-focus previous)
(Alt Shift) BracketRight     >> $(komorebic cycle-focus next)

# Move windows
(Alt Shift) H >> $(komorebic move left)
(Alt Shift) J         >> $(komorebic move down)
(Alt Shift) K         >> $(komorebic move up)
(Alt Shift) L         >> $(komorebic move right)
(Alt Shift) Enter    >> $(komorebic promote)

# Stack windows
Alt {ArrowLeft}              >> $(komorebic stack left)
Alt {ArrowDown}              >> $(komorebic stack down)
Alt {ArrowUp}                >> $(komorebic stack up)
Alt {ArrowRight}             >> $(komorebic stack right)
Alt {Semicolon}             >> $(komorebic unstack)
Alt {BracketLeft}             >> $(komorebic cycle-stack previous)
Alt {BracketRight}             >> $(komorebic cycle-stack next)

# Resize
Alt Equal          >> $(komorebic resize-axis horizontal increase)
Alt Minus         >> $(komorebic resize-axis horizontal decrease)
(Alt Shift) Equal  >> $(komorebic resize-axis vertical increase)
(Alt Shift) Minus >> $(komorebic resize-axis vertical decrease)

# Manipulate windows
Alt T                 >> $(komorebic toggle-float)
(Alt Shift) F         >> $(komorebic toggle-monocle)

# Window manager options
(Alt Shift) R         >> $(komorebic retile)
Alt P                 >> $(komorebic toggle-pause)

# Layouts
Alt X                 >> $(komorebic flip-layout horizontal)
Alt Y                 >> $(komorebic flip-layout vertical)

# Workspaces
Alt 1                 >> $(komorebic focus-workspace 0)
Alt 2                 >> $(komorebic focus-workspace 1)
Alt 3                 >> $(komorebic focus-workspace 2)
Alt 4                 >> $(komorebic focus-workspace 3)
Alt 5                 >> $(komorebic focus-workspace 4)
Alt 6                 >> $(komorebic focus-workspace 5)
Alt 7                 >> $(komorebic focus-workspace 6)
Alt 8                 >> $(komorebic focus-workspace 7)
Alt 9                 >> $(komorebic focus-workspace 8)
Alt 0                 >> $(komorebic focus-workspace 9)

# Move windows across workspaces
(Alt Shift) 1         >> $(komorebic move-to-workspace 0)
(Alt Shift) 2         >> $(komorebic move-to-workspace 1)
(Alt Shift) 3         >> $(komorebic move-to-workspace 2)
(Alt Shift) 4         >> $(komorebic move-to-workspace 3)
(Alt Shift) 5         >> $(komorebic move-to-workspace 4)
(Alt Shift) 6         >> $(komorebic move-to-workspace 5)
(Alt Shift) 7         >> $(komorebic move-to-workspace 6)
(Alt Shift) 8         >> $(komorebic move-to-workspace 7)
(Alt Shift) 9         >> $(komorebic move-to-workspace 8)
(Alt Shift) 0         >> $(komorebic move-to-workspace 9)

# Send windows across workspaces
(Control Alt Shift) 1         >> $(komorebic send-to-workspace 0)
(Control Alt Shift) 2         >> $(komorebic send-to-workspace 1)
(Control Alt Shift) 3         >> $(komorebic send-to-workspace 2)
(Control Alt Shift) 4         >> $(komorebic send-to-workspace 3)
(Control Alt Shift) 5         >> $(komorebic send-to-workspace 4)
(Control Alt Shift) 6         >> $(komorebic send-to-workspace 5)
(Control Alt Shift) 7         >> $(komorebic send-to-workspace 6)
(Control Alt Shift) 8         >> $(komorebic send-to-workspace 7)
(Control Alt Shift) 9         >> $(komorebic send-to-workspace 8)
(Control Alt Shift) 0         >> $(komorebic send-to-workspace 9)

CapsLock{E} >> ArrowUp
CapsLock{S} >> ArrowLeft
CapsLock{D} >> ArrowDown
CapsLock{F} >> ArrowRight
CapsLock{W} >> Home
CapsLock{R} >> End
CapsLock{G} >> Delete
CapsLock{H} >> Backspace
CapsLock{N} >> 0
CapsLock{M} >> 1
CapsLock{Comma} >> 2
CapsLock{Period} >> 3
CapsLock{J} >> 4
CapsLock{K} >> 5
CapsLock{L} >> 6
CapsLock{U} >> 7
CapsLock{I} >> 8
CapsLock{O} >> 9
CapsLock{Slash} >> Period
CapsLock{Semicolon} >> Shift{8}
CapsLock{P} >> Slash
CapsLock{BracketLeft} >> Minus
# CapsLock{BracketRight} >>
CapsLock{Quote} >> Shift{Equal} 
CapsLock{C} >> Shift{Comma} #<
CapsLock{V} >> Shift{Period} #>
# CapsLock >> Escape
# Escape >> CapsLock

[title="Stremio - Freedom to Stream" path="stremio.exe"]

H >> ArrowLeft
J >> ArrowDown
K >> ArrowUp
L >> ArrowRight
ristomatti commented 6 months ago

In many of the mappings you've got a space after the modifiers, is it intentional (e.g. you press the following key in sequence and not while holding the modifiers down)?

Do all of the mappings work as expected besides the issue you described?

ristomatti commented 6 months ago

To clarify my question, is this what you intended to do:

# Workspaces
Alt 1                 >> $(komorebic focus-workspace 0)
Alt 2                 >> $(komorebic focus-workspace 1)

...rather than this:

# Workspaces
Alt{1}                 >> $(komorebic focus-workspace 0)
Alt{2}                 >> $(komorebic focus-workspace 1)
rp1231 commented 6 months ago

No that is not what I intended to do: What Intended was indeed:

# Workspaces
Alt{1}                 >> $(komorebic focus-workspace 0)
Alt{2}                 >> $(komorebic focus-workspace 1)

But despite correcting the config to this, the problem remains.

rp1231 commented 6 months ago

Adding Alt >> Alt at the top of my configuration seems to have solved the problem.