Send key combinations with special keyboard layout

Hello there,

Since I’ve tried all combinations I can think of, I’m trying my luck with you.

I’m using an unconventional layout, similar to a Dvorak-keyboard. Unfortunately, some programs (mostly from Microsoft…) ignore some parts of the keyboard-settings, and reinterpret the hotkeys that I press in their own way.

Example: when I press the c-button on my keyboard, it types a k. To type a c I press the physical key h. However, I configured the keyboard layer that is linked to Command to leave the keyboard in its original version; i.e. when I press Cmd+C, what gets sent to the program is Cmd+C.

Unfortunately, some programs ignore this setting, and force me to press Cmd+H (h being the physical key), which is extremely annoying.

Fortunately, there is a brilliant tool called BTT :star_struck: that helps me with all those programs. In all those programs, I catch the hotkeys that don’t work, and call the corresponding menu item. Bonus advantage: since I can group all those programs, I don’t have to reconfigure the hotkeys for every single program.

Unfortunately, Microsoft doesn’t put all available commands in the menu bar, no idea why. One that is particularly useful for me is copy format and paste format. They are accessible (in Word, but also in PowerPoint for instance), by pressing Option+Cmd+C and Option+Cmd+V (in recent versions of Office). This works when I use a more standard layout. And I don’t manage to get them pressed with my Dvorak-type layout.

In BTT, I tried changing the keyboard layout before and after sending the hotkey, and even this doesn’t work. I’ve tried playing with the option to adapt the hotkey to the keyboard layout. I don’t know how many combinations I’ve tried, and for now, I’ve failed. BTT gets triggered (I verified this with a HUD-message), but then, the hotkey that gets sent to Word is never the right one. Manually changing the layout to a more standard layout, pressing the hotkey, and changing the layout again to my layout works.

What else can I try? I very much hope you can help and wish you a wonderful day!

unfortunately that stuff is complicated and BTT also can't handle it very well. Not sure whether there are other apps that are better suited for this usecase.

Have you tried adding some delay after changing the keyboard layout? (Also make sure the shortcut to send was recorded when that standard keyboard layout was active)

Hi Andreas,

Thank you for your quick reply!

The delay (including longer ones) didn't change anything.

I recorded the keystrokes again in many different ways, varying between keyboards. Still no luck. I also retried with and without the option to adapt to the layout.

To make it simple, I tried one keystroke: cmd+option+v.

In my layout, the v is where the u is usually. At the normal spot of the v, I have the w.

With the different combinations I tried, I manage to get BTT to send to word either cmd+option+w or cmd+option+u, depending on the settings. But never cmd+option+v.

Probably there could be another tool. The thing is: your tool is incredible and I'd really like to place all my bets on yours.

Have a great evening!

Victory! So, here’s what I did.

  1. @Andreas_Hegenberg There’s a small bug in the action to change the keyboard layout. When you add the action, it shows a keyboard layout to be activated. In my case, it was the option I wanted, so I didn’t touch it. Well, if you don’t touch it, the action doesn’t work. And that’s why I was having such a hard time before. So I changed it to another layout and then back to the first option, and the action worked.

  2. In the interface, the trigger I used looks like cmd+option+w (for instance, in my layout), which corresponds to the key labelled v on a normal layout. The action looks like cmd+option+v, which is what I would like it to press in the target layout. I also checked the option to adapt to the target layout.

  3. Since it works often but not all the time, I added, like you suggested, an async delay of 0.1 seconds.

That’s all, I knew BTT could do it! :slight_smile: Have a great day!

Oh great, I'll fix that bug!

1 Like