;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; test-f3.tf ; ; By: Hair@BatMUD ; ; ; ; This shows how to use function keys to toggle triggers ; ; In this case, it sets a hook dd to send the dance ; ; command to the mud, but the trigger could do anything ; ; from digging graves, to greeting people as they walk ; ; into the room. If you are using the vi editor, to ; ; get the control codes for the function keys, first ; ; type ctrl-v then hit the key you want, in this case ; ; F3. Any function key or the keypad can be used. ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /SET toggled_f3=0 /DEF -b"[13~" fkey3_toggle = \ /IF (toggled_f3==0) \ /toggle_on_f3key %; \ /ELSE \ /toggle_off_f3key %; \ /ENDIF /DEF toggle_on_f3key = \ /DEF -ag -h"send {dd}" do_dancing = /SEND dance %; \ /SEND @party report I'm dancing! %; \ /SET toggled_f3=1 /DEF toggle_off_f3key = \ /UNDEF do_dancing %; \ /SEND @party report I'm not dancing anymore %; \ /SET toggled_f3=0