So I’m trying to use the Write Text function/macro with some text like “blabla-bleble”
If I just type this into the box in UHK Agent (UHK60 with german layout btw), bind it to a key and save to keyboard, it types out (into notepad for example) “blablaßbleble”
So I guess they keyboard/macro really just sends the scancodes for a english/us/uk keyboard which results to the german ß being typed instead of the -
on a german layout the ß is on the right of the 0 (zero), on an english layout the - is on the right of the 0 (zero).
Now, how do I make it type a - though? Writing in a ß doesn’t work as it won’t let me.
EDIT:
It seems like my thinking was wrong. Instead of trying to write a ß, I had to put in a / as that’s where the - sits on the en-US layout. “blabla/bleble” then outputs “blabla-bleble”
I tried the typeKeySeq macros but everytime I arrived at “t” the whole UHK Agent froze repeatedly.
Infos about scancodes and ids was derived from here:
It may also be helpful to search the reference-manual for tapKey, tapKeySeq info, as well as the relevant MODMASK, SHORTCUT, SCANCODE_ABBREV, and KEYID_ABBREV usage.
If I’m not mistaken (not sure about using RAlt?), I think any of the following methods should produceblablabla-blebleble on a German OS layout:
The UHK does not and cannot know what keymap your host system has. It only knows the US keymap by default. When you tell it to write a-b it will press the keys that are labelled a, -, and b on a US keyboard. On a German keyboard, a and b are in the same spot, so they will work as expected. However, the ß key sits on the German keyboard where the US keyboard has the -, so when the UHK sends to the host to tap that key, the host produces a ß character.
So you need to identify which key has the - character on it. Then you need to instruct the UHK to send the US-equivalent key.
I am a bit more concerned about the “the whole UHK Agent froze repeatedly.” part.
Can you provide more details?
When does that happen - when typing into the command action field when creating the macro? But there the ‘t’ is the first letter. Does it mean that Agent freezes on any input in that field?
Yes, exactly. You tell the UHK to press the key that is labelled / on the US keyboard. That key translates to producing the ‘-’ character on your German keymap.
So, I actually tried setting my OS to use German keyboard layout (first time ever using non en-US), and my above image examples will work if you replace the RA-minusAndUnderscore with either / or slashAndQuestionMark.
That was certainly a brain-twister for me.
This reminds me of a typo I saw on another forum somewhere a long time ago that said:
“English as a fist language”
I can’t imagine how much of a PITA it must be being a programmer who’s native language isn’t english.
I think I found a quick way to reproduce the mentioned freezing issue in Agent on Win 11.
•Create a new macro and add a macro command beginning with tapKeySeq.
•Then type f, and when Agent’s auto-predict offers f1, hit enter to choose it.
•Then tap space, and repeat auto-selecting f1 again. Repeat.
After auto-selecting f1 a few times, Agent starts hanging between entries, and will eventually lock up. Opening Windows task manager shows that Agent is using ~4-5% CPU and memory usage slowly climbs.