There are several things to unpack here.
* AutoKey is not very good with remapped keyboards. it will usually act as
if you typed keys (hotkeys and trigger abbreviations) on an unmapped
keyboard. You might be able to get some fancier things to work somewhat,
but you're way better off using ASCII as you have surmised.
* I'm not sure if you need it at the moment, but Alt-Gr is not defined as
a modifier key in AutoKey prior to 0.96 - which is being beta tested now.
*There is nothing native to AutoKey which detects/handles keyboard layouts.
* However, since AutoKey scripts are written in native Python 3.x, *if*
you can figure out how to get something to work in standalone Python
(where it's much easier to debug and test), you can either put all that
code into an AutoKey script and use AutoKey to invoke it - and add some
API calls to perform keyboard and mouse events or you can write a simpler
AutoKey script that directly runs your external code using the subprocess
module to invoke it and optionally retrieve its exit status and any
results it may have written to standard output (stdout).
* Subprocess will run almost anything that Linux will run, so you're not
restricted to Python for external programs either.
* Also, since you're probably not using the EN-US locale, be sure to read
https://github.com/autokey/autokey/wiki/Adding-Unicode-Characters-or-Emojis-to-Your-Scripts-or-Phrases
and browse through the rest of our wiki where you will find tips and
tricks for a number of other situations you may encounter.
On a personal note, if you figure out how to get AutoKey to reliably emit
properly indented code of any sort anywhere, please come back and tell us
about it! I have tried to do this with bash in kate without much success.
I'm sure it can be done, I just don't know how.
Joe
> I’m trying to use AutoKey to automatically create a for loop for Java when
> I press <Alt-Gr>+w. The obvious way to do thisI would be to write a script
> and then configure a Hotkey, however I want it to do it only when I have
> it
> set to a specific keyboard layout. I set the character for <Alt-Gr>+w to
>
> (\ue005, I have my reasons), and set that as an Abbreviation. But it
> didn’t work. it just typed the character. I thought it was be because it
> wasn’t a defined character in Unicode (just in the private use area), so I
> tried using ש because it *is* defined (and I have the Hebrew keyboard
> installed). This didn’t work either, causing me to conclude that only
> ASCII characters can be used in abbreviations.
> Is this true? Is there any way around it? Any other ideas for how to
> make
> it only do this on this keyboard?
> Any input is welcome.
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
autokey-user...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autokey-users/7d295ed1-f70c-4233-8e7e-a75045248b74n%40googlegroups.com.
>