I have quite a few AutoHotKey scripts that are triggered by various combinations of Shift, Control, Alt and some other key on the main keyboard.

For example, this (which I use to enter a DokuWiki level-1 heading into a text-editor):

    Send, ======  ======
    Send, {Left}{Left}{Left}{Left}{Left}{Left}{Left}

The problem I have is that I only use some of them rarely, and I find it really hard to easily remember what the abbreviations ^, ;, + and # mean.

(I am aware of this table of Modifier key abbrevations - I just don't use them often enough to memorise them, and adding comments at the top of my scripts hasn't helped enough either.)

Hoped-for improvement

Having seen examples like this one, I would like to change the script above to something like this, whose keyboard short-cut is immediately readable:

Shift & Alt & 1:: ; gives "invalid hotkey" error
    Send, ======  ======
    Send, {Left}{Left}{Left}{Left}{Left}{Left}{Left}

However, the above gives me error, saying it is an "invalid hotkey". (I am using AutoHotKey

I've tried various combinations, already, to no avail:

Shift & Alt & 1:: ; => invalid hotkey
Shift & Alt & {1}:: ; => invalid hotkey
Shift&Alt&1:: ; => does not exist in the current keyboard layout
Shift^Alt^1:: ; => does not exist in the current keyboard layout

Is there a way to correct the above list of keys, to be both readable and working, please?

Edit: further experiments

Having worked through the table of modified symbols to define hotkeys, I've tried various additional combinations of named symbols, to try and understand what's allowed: none of them give the desired effect:

These are all OK (showing that named keys cam be used here - but they are not the hotkey I'm after):

Alt & 1::
Ctrl & 1::
Shift & 1::
LShift & 1::

These all give "invalid hotkey"

+ & Ctrl & 1::
+Ctrl & 1::
{~Shift} & 1::
{~Shift} & {~Alt} & 1::
~Shift & ~Alt & 1::
LShift & LAlt & 1::
LAlt & LShift & 1::
Shift & Alt & 1::
Alt & Shift & 1::
Ctrl & Alt & 1::
Shift & Alt & 1::
Shift & Alt & {1}::
1 & Shift & Alt::

And these all give "does not exist in the current keyboard layout"

  • Why not just make comments. Or just write a macro that autocomments the symbols? – surfasb Sep 12 '11 at 9:05
  • @surfasb Thanks for the suggestion - especially the macro idea. I think that this is the best that I'm going to be able to do. So it you would put it in to an answer, I'll accept it as the right answer. Clare – Clare Macrae Sep 12 '11 at 18:10

Yeah, I guess it stinks that those arbitrary symbols are used. A self documenting macro is probably your best bet.

There has been talk in the AHK forums about an HTML documentor. I'll see if I can dig up those posts also.

| improve this answer | |
  • Thanks for the reply. Your comment on the question itself was helpful too. – Clare Macrae Sep 12 '11 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.