Can't activate SuperDuper mode while using Russian keyboard
aantipov opened this issue Β· comments
Problem
When switching to Russian language, I can't activate SuperDuper mode.
At the same time, WindowsLayout and Markdown modes work just fine.
I use macOS Catalina
Is there any way to make it working?
When switching to Russian language...
Hi @jasonrudolph
He is a gif. Hope it'll help
@aantipov: Thank you for sharing that gif. That's really helpful!
I tried to reproduce the issue, but I'm unable to reproduce it. This is the behavior I'm seeing:
Note: You mentioned that you're using macOS Catalina. I'm currently using macOS Mojave (10.14.6), so maybe the issue is specific to Catalina?
@jasonrudolph Thanks for trying to help me.
As per the gif you provided, you are not actually changing the current language, you are just highlighting the InputSource. The symbols typed in the "Input area" are always English.
Try to change the language using the Language icon in the topbar (as I did in my gif) or using a keyboard shortcut
Try to change the language using the Language icon in the topbar (as I did in my gif) or using a keyboard shortcut
@aantipov: Thanks for that clarification. That allowed me to successfully reproduce the issue.
Currently, (S)uper (D)uper Mode looks for specific English characters. For example:
keyboard/hammerspoon/super.lua
Lines 35 to 37 in 2d2b159
When using an English keyboard, this works. When using a non-English keyboard, it doesn't work. Thanks for identifying this issue!
If anyone has some time to investigate a fix, I think this could be resolved by updating super.lua
to look at keycodes instead of characters. For example, the excerpt above would become something like this:
local keyCode = event:getKeyCode()
if keyCode == hs.keycodes.map['s'] then
You can see the related API docs at:
- https://www.hammerspoon.org/docs/hs.eventtap.event.html#getKeyCode
- https://www.hammerspoon.org/docs/hs.keycodes.html#map
There are a handful of places where super.lua
currently uses event:getCharacters()
, so all of those places will likely need to be updated to use keycodes instead.
This is likely resolved by #61, so I'm going to close this issue.
If you're still able to reproduce the problem using the latest code on the master
branch, please let me know, and I'll re-open this issue.
It works now with the latest update, so the problem was fixed. Thanks!