addKeyBinding

addKeyBinding

Synopsis: addKeyBinding( name, onKey, do, isActive )

name	: The keybinding's name.
	  (used by other functinos to access this keybinding)
onKey	: If the representation (see below) of the pressed key
	  matches onKey, the keybinding is triggered.
do	: If you give a string here, the string is sent to
	  the server.
	  If you specify a sub ref, it's executed (you can
	  access the key by the perl $1...$n variables. The
	  last match was your noKey regexp match). If the
	  sub returned true, the key is considered "used"
	  and not processed any further.
isActive: The initial keybinding state (default = 1).
	  (see setKeyBindingState)

Example:
	addKeyBinding('Underscore', '..10.... (.*)',
		      sub { XM::send("_$1\n"); return 1; }
	# If you press ctrl-a, for example, "_a" is sent
	# to the server


KDE Logo