koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
6.05k stars 204 forks source link

Bindings matched with `*` inside `proc_map_lst` doesn't work as expected #344

Closed sahinakkaya closed 5 months ago

sahinakkaya commented 5 months ago

Consider the following binding:

cmd - a  [
    "kitty" :   skhd -k "a"
    "*"     :   skhd -k "b"
]

I expect this binding to send letter a when I am inside kitty and send letter b otherwise. But it doesn't send b if I am not inside kitty. Instead it sends cmd - a as if I had specified config like:

cmd - a  [
    "kitty" :   skhd -k "a"
    "*"     ~
]

I think this is a bug.

sahinakkaya commented 5 months ago

Oh, because I was using * incorrectly. There shouldn't be any quotes around *. The following works as expected:

cmd - a  [
    "kitty" :   skhd -k "a"
    *       :   skhd -k "b"
]

I was trying to understand what's wrong for half an hour and the moment I opened this issue I figured why it doesn't work lol