Dvorak on host system and write statement in macro

Hello there,

If you have a Dvorak layout on your host system, you’ll have QWERTY layout on UHK most of the time.
In this configuration, when you’ll use write statement in a macro, UHK will send wrong keycodes and output gibberish,
much like a qwerty-person would, when trying to type on a machine with a Dvorak layout.

for example, if you’ll use write It works on my machine. in a macro,
the UHK will type Cy ,rpto rb mf majdcb.v on any keymap.

I think that using something like switchKeymap DVO in macro just before using write statement should cancel this effect, but this does not work at the moment of writing this post.

As a workaround, I wrote a little script that will read a text from stdin, reverse the qwertydvorak effect, and will output a string that will be transformed into to a normal text in before mentioned conditions.

Example usage:

../uhk% echo hello | ./undvorak.py 
../uhk% ./uhkcmd.sh 'write jdpps'
../uhk% hello

With friendly regards,

1 Like

Hi @alg,

Thanks for sharing your script! Others might find it useful.

Yes, the UHK assumes the host keymap is US. I am facing the same difficulty with Colemak as my host keymap. I kind of wish the UHK had an “outbound mapping” to convert characters to host keymaps.