Apr. 16th, 2013

alexpgp: (Computing)
Yesterday, I noted that I was able to "fix" a number of AutoHotkey macros that no longer worked now that I was using the Unicode-compatible version of the program. The new code works, in Word, but not in other programs that don't grok Unicode, such as my implementation of emacs.

In other words, the change of AutoHotkey macro, from
:*c?:\ZH\::{ASC 0142}
to
:*c?:\div\::
Send {U+017D}
return
will not allow me to type a 'LATIN CAPITAL LETTER Z WITH CARON' (aka, 'Z HACEK') in just any old place (Word, check; Semagic, check; emacs, nope).

So, I tried a new method:
:*c?:\ZH\::
Send,{AltDown}{Numpad0}{Numpad1}{Numpad4}{Numpad2}{AltUp}
return
and it works well enough, but not in emacs (at least, not out of the box), because the macro mimics the physical act of pressing down the Alt key, then four numeric keys on the numeric keypad (as opposed to the numbers on the top row of the alphabet section), and finally releasing the Alt key, which theoretically should result in the appropriate letter showing up on the screen—except that pressing down the Alt key is generally a way of telling emacs that you're about to invoke a command.

The good news is that in my version of emacs, the combination of a depressed Alt key and a depressed numeric pad key is not defined, so "all I have to do" is figure out how to pass those keystrokes on to the operating system, and I'm jake.

More as I learn more...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 9th, 2025 11:44 pm
Powered by Dreamwidth Studios