jasonrudolph / keyboard

⌨ Toward a more useful keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 @aantipov: Can you describe the specific steps for switching to Russian language? (I want to make sure I'm following the same exact steps you're following.) If you can provide some screenshots, that would be especially helpful.

Hi @jasonrudolph
He is a gif. Hope it'll help

keyboard

@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:

out

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:

local characters = event:getCharacters()
if characters == 's' then

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:

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!