APLX Help : Help on APL language : System Functions & Variables : ⎕PFKEY Set up Function keys
|
|
![]() |
|
The system function (')WSID',⎕R) ⎕PFKEY 5 (')TIME',⎕R) ⎕PFKEY 5+15 The strings you attach can be used for any purpose you like, either as short-cuts in APL development, or within your application. However, be aware that some function-key combinations may be reserved for use by the operating system or window-manager, or as menu short-cuts. In this case programming the function key yourself may not work (because the operating-system may intercept it before APLX sees the keystroke), or may be incompatible with the user-interface guidelines for the system you are using. The exact implementation of this system function varies according to the host system. Under MacOS, the Control-key strings are not effective. In Linux Server Edition (dumb-terminal), neither the Shift nor Control-key strings are effective. Associating a sequence of strings with a function keyAn extension to standard function-key programming allows you to associate a sequence of strings with a given function key. (This works with the Session window only). Each time you press the function key, the next string in the sequence is output to the session window, at the end of the current session. If you press the function key whilst Shift is held down, the previous string in the sequence is output. The sequence wraps round at the beginning and end. To use this mode, supply a text matrix as the left argument of the For example, you could program function key 2 as follows:
strings←'/' ⎕BOX 'x←1/y←2/x run y' strings x←1 y←2 x run y strings ⎕PFKEY 2 If you now press function key 2 four times in succession, the three strings will be output in turn, and then the sequence will wrap round to the first again on the fourth key press. This facility is very useful for:
|
|
APLX Help : Help on APL language : System Functions & Variables : ⎕PFKEY Set up Function keys
|
Copyright © 1996-2010 MicroAPL Ltd