Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua

Home Page:http://www.hammerspoon.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modifier key's single tapping problems.

hjlee-repo opened this issue · comments

I looked into the Hammerspoon API and several scripts,
it seems that combinations of modifier keys (Ctrl, Shift, Cmd...) and
regular keys (h,j,k,l..etc) work well, but modifier keys by themselves cannot distinguish single tapping.
Strangely, the modifier key can only recognize events with 'flagsChanged',
and in this case, I can recognize which modifier key was pressed in the Down event, but cannot recognize which mod key was released in the Up event.
Furthermore, the result of the getType() function is 12 for both up and down, whereas I can recognize 10 (down) and 11 (up) for regular keys.
I wonder if this is intended or a bug. Are you any plans to fix it in a future version?