HotkeyNet: the next generation

Creates a list of keys that can be used as hotkey triggers.


var x = keylist ( item [, item ...] [except item [, item ...]] )


Each item is a key name, a key range, or another list.

A key range is two keynames separated by a hyphen like this:

a - z

Except is the word "except." Items to the left of "except" get added to the list; items to the right get subtracted.

Contextual keywords

When used as arguments for keylist, the following ordinary words become keywords:

— except

— names of keys

— AllMainKeys

— AllKeys

— AllModifiers

— AllMouseButtons


An item can be the name of a list you created yourself or the predefined lists AllMainKeys or AllKeys.

For ranges (two key names separated by a hyphen), HotkeyNet uses virtual key codes. For example, you could write:

var MyList = keylist ( Plus - Oem3 );

The virtual key codes for those two keys are 0xBB and 0xC0, so HotkeyNet adds to the list all the keys with virtual key codes between those two numbers. Those keys happen to be:


For a list of virtual key codes, go to


The following list contains a, b, and c:

var k1 = keylist ( a, b, c );

The following list uses a range. It contains a through z:

var k2 = keylist ( a - z );

The following list contains all the letters except s:

var k3 = keylist ( a - z except s);

The following list contains a, b, and c (from the first list above) and all the numbers:

var k4 = keylist ( k1, 0-9 );

This page was last revised on June 14, 2009
Copyright © 2009 HotkeyNet Software