AutoHotkey? is an open source scripting language for Windows that can automate and customize almost any action on your PC.
Now that I see the page you wrote, I’m not sure we need it on the wiki – after all, if we have this page, why don’t we have pages for GIMP, GNU/Linux, Slackware, Debian, GNU screen, mail, sendmail, Tex, and a myriad of other pages? Slowly, the Emacs Wiki will look like an incomplete and unmaintained software directory.
I think such a page should relate to Emacs is some way. In this particular case, we already have the page AutoHotKey Mode that says everything there is to say (from the point of view of an Emacs user who doesn’t know what AutoHotKey is or does).
In short, I think we should replace all instances of
[http://www.autohotkey.com/wiki/ AutoHotKey] and merge this page with AutoHotKey Mode (if necessary), and delete it. – AlexSchroeder
I agree with the above from Jonas, except what I would like to see if not here then somewhere, is a HowTo make use of AHK to generalize the emacs keystrokes to the entire windoze environment.
So, on-topic for this page would be, e.g. information about how to use Autohotkey in conjunction with Emacs. I use the US keyboard layout, since I am a programmer, but I frequently need to type European diacritical characters when I write German or Swedish, or type my name. I have an Autohotkey setup with things like
for all the diacriticals I use regularly. This doesn’t work in Emacs though. Autohotkey sends ä to the receiving application by sending simulated keystrokes for Alt-keypad-0 Alt-keypad-2 Alt-keypad-2 Alt-keypad-8, which in most Windows applications generates the character with decimal code 0228, ä. Emacs doesn’t support this, so I hacked together the equivalent functionality in Elisp:
;; Hack to support Windows Alt+keypad to enter characters by numerical ;; code. Needed to support insertion of European characters from ;; Autohotkey scripts. (defvar jonas:alt-keypad-seq nil) (defun jonas:alt-keypad-value (key) (case key (M-kp-0 0) (M-kp-1 1) (M-kp-2 2) (M-kp-3 3) (M-kp-4 4) (M-kp-5 5) (M-kp-6 6) (M-kp-7 7) (M-kp-8 8) (M-kp-9 9))) (defun jonas:alt-keypad-translate (seq) (let ((acc 0)) (dolist (elem seq acc) (setq acc (+ (jonas:alt-keypad-value elem) (* 10 acc)))))) (defun jonas:alt-keypad () "" (interactive) (unless (eq last-command 'jonas:alt-keypad) (setq jonas:alt-keypad-seq nil)) (push last-command-char jonas:alt-keypad-seq) (if (= (length jonas:alt-keypad-seq) 4) (progn (ucs-insert (jonas:alt-keypad-translate (reverse jonas:alt-keypad-seq))) (setq jonas:alt-keypad-seq nil)))) (global-set-key [M-kp-0] 'jonas:alt-keypad) (global-set-key [M-kp-1] 'jonas:alt-keypad) (global-set-key [M-kp-2] 'jonas:alt-keypad) (global-set-key [M-kp-3] 'jonas:alt-keypad) (global-set-key [M-kp-4] 'jonas:alt-keypad) (global-set-key [M-kp-5] 'jonas:alt-keypad) (global-set-key [M-kp-6] 'jonas:alt-keypad) (global-set-key [M-kp-7] 'jonas:alt-keypad) (global-set-key [M-kp-8] 'jonas:alt-keypad) (global-set-key [M-kp-9] 'jonas:alt-keypad)
Another great thing about Autohotkey is that it allows you to remap the Caps Lock key, which is rather difficult in Windows. Just use
to make it a Super key—very useful in Emacs if you define your own keybindings. --JonasOster