[ https://issues.apache.org/jira/browse/GUACAMOLE-2120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eugen Hartmann updated GUACAMOLE-2120: -------------------------------------- Description: Guacamole should allow users to choose function key behavior like it is done in Putty. At least VT100+ should be supported. !putty-vt100.png! You can read the information about VT100 here [https://vt100.net/docs/vt100-ug/chapter3.html] Also, please see the VT100 keyboard below !vt100-keyboard.jpg|width=704,height=209! *FUNCTION KEYS* There are four functional keys on the VT100 keyboard which always send the same escape codes (see below) independently of modes like DECCKM, DECKPAM, DECIM, etc. The original VT100 keyboard does not have the F5 key but we process it and send an escape sequence suggested by some sources. When you push the other functional keys, we send the escape codes not related to VT100. Simply avoid pressing the keys if you do not need the behavior. {noformat} F1 -> ^[0P F2 -> ^[0Q F3 -> ^[0R F4 -> ^[0S F5 -> ^[[15~{noformat} F6, and so on -> same as non VT100 *THE OTHER KEYPAD KEYS* The following are the other keys on the VT100 keypad: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, dash, dot, comma, enter. They send exactly the same values in the numeric keypad mode, but different escape codes (see blow) in the alternate key mode. {noformat} 0 -> ^[Op 1 -> ^[Oq 2 -> ^[Or 3 -> ^[Os 4 -> ^[Ot 5 -> ^[Ou 6 -> ^[Ov 7 -> ^[Ow 8 -> ^[Ox 9 -> ^[Oy - -> ^[Om . -> ^[On {noformat} There is no 'comma' on regular keyboard keypads. So we use the '*' keypad key press to send the VT100 sequence code: {noformat} * -> ^[Ol{noformat} At least Chrome in my environment (both Windows and macOS) does not differentiate the regular ENTER and the keypad ENTER (always same code and location 0), so we use the '+' keypad key to send the VT100 sequence code: {noformat} + -> ^[OM{noformat} The alternate keypad mode can be enabled using the DECKPAM sequence (ESC= aka ^[=). You can do it manually via the command line: {code:java} printf '\033='{code} You can return to the standard mode (numeric keypad mode) using the DECKPNM sequence (ESC> aka ^[>). Run the command: {code:java} printf '\033>'{code} On Windows It is important to have NUM LOCK ON on regular keyboards to make VT100 sequences work correctly. Modern Apple laptops do not have keypads on them. On macOS, a regular keyboard will always have NUM LOCK ON, because the OS does not process the key at all and historically never had it on Apple keyboards. *ARROW KEYS* You can set the DECCKM mode to enable the application sequences: {code:java} printf '\033[?1h'{code} LEFT -> ^[OD RIGHT -> ^[OC UP -> ^[OA DOWN -> ^[OB You can reset the DECCKM mode to enable the cursor sequences: {code:java} printf '\033[?1l'{code} LEFT -> ^[D RIGHT -> ^[C UP -> ^[A DOWN -> ^[B ***Use _cat_ to see the code sequences which you send by pressing keyboard keys: {code:java} cat > somefile{code} was: Guacamole should allow users to choose function key behavior like it is done in Putty. At least VT100+ should be supported. !putty-vt100.png! You can read the information about VT100 here [https://vt100.net/docs/vt100-ug/chapter3.html] Also, please see the VT100 keyboard below !vt100-keyboard.jpg|width=704,height=209! *FUNCTION KEYS* There are four functional keys on the VT100 keyboard which always send the same escape codes (see below) independently of modes like DECCKM, DECKPAM, DECIM, etc. The original VT100 keyboard does not have the F5 key but we process it and send an escape sequence suggested by some sources. When you push the other functional keys, we send the escape codes not related to VT100. Simply avoid pressing the keys if you do not need the behavior. {noformat} F1 -> ^[0P F2 -> ^[0Q F3 -> ^[0R F4 -> ^[0S F5 -> ^[[15~{noformat} F6, and so on -> same as non VT100 *THE OTHER KEYPAD KEYS* The following are the other keys on the VT100 keypad: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, dash, dot, comma, enter. They send exactly the same values in the numeric keypad mode, but different escape codes (see blow) in the alternate key mode. {noformat} 0 -> ^[Op 1 -> ^[Oq 2 -> ^[Or 3 -> ^[Os 4 -> ^[Ot 5 -> ^[Ou 6 -> ^[Ov 7 -> ^[Ow 8 -> ^[Ox 9 -> ^[Oy - -> ^[Om . -> ^[On {noformat} There is no 'comma' on regular keyboard keypads. So we use the '*' keypad key press to send the VT100 sequence code: {noformat} * -> ^[Ol{noformat} At least Chrome in my environment (both Windows and macOS) does not differentiate the regular ENTER and the keypad ENTER (always same code and location 0), so we use the '+' keypad key to send the VT100 sequence code: {noformat} + -> ^[OM{noformat} The alternate keypad mode can be enabled using the DECKPAM sequence (ESC= aka ^[=). You can do it manually via the command line: {code:java} printf '\033='{code} You can return to the standard mode (numeric keypad mode) using the DECKPNM sequence (ESC> aka ^[>). Run the command: {code:java} printf '\033>'{code} On Windows It is important to have NUM LOCK ON on regular keyboards to make VT100 sequences work correctly. Modern Apple laptops do not have keypads on them. On macOS, a regular keyboard will always have NUM LOCK ON, because the OS does not process the key at all and historically never had it on Apple keyboards. *ARROW KEYS* You can set the DECCKM mode to enable the application sequences: {code:java} printf '\033[?1h'{code} LEFT -> ^[OD RIGHT -> ^[OC UP -> ^[OA DOWN -> ^[OB You can reset the DECCKM mode to enable the cursor sequences: {code:java} printf '\033[?1l'{code} LEFT -> ^[D RIGHT -> ^[C UP -> ^[A DOWN -> ^[B ***You can use _cat_ to see the code sequences which you send by pressing keyboard keys: {code:java} cat > somefile{code} > Support VT100 escape codes sent for function keys and keypad > ------------------------------------------------------------ > > Key: GUACAMOLE-2120 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-2120 > Project: Guacamole > Issue Type: Improvement > Components: guacamole > Reporter: Eugen Hartmann > Priority: Major > Fix For: 1.7.0 > > Attachments: putty-vt100.png, vt100-keyboard.jpg > > > Guacamole should allow users to choose function key behavior like it is done > in Putty. At least VT100+ should be supported. > !putty-vt100.png! > > You can read the information about VT100 here > [https://vt100.net/docs/vt100-ug/chapter3.html] > Also, please see the VT100 keyboard below > !vt100-keyboard.jpg|width=704,height=209! > *FUNCTION KEYS* > There are four functional keys on the VT100 keyboard which always send the > same escape codes (see below) independently of modes like DECCKM, DECKPAM, > DECIM, etc. The original VT100 keyboard does not have the F5 key but we > process it and send an escape sequence suggested by some sources. When you > push the other functional keys, we send the escape codes not related to > VT100. Simply avoid pressing the keys if you do not need the behavior. > {noformat} > F1 -> ^[0P > F2 -> ^[0Q > F3 -> ^[0R > F4 -> ^[0S > F5 -> ^[[15~{noformat} > F6, and so on -> same as non VT100 > > *THE OTHER KEYPAD KEYS* > The following are the other keys on the VT100 keypad: 0, 1, 2, 3, 4, 5, 6, 7, > 8, 9, dash, dot, comma, enter. They send exactly the same values in the > numeric keypad mode, but different escape codes (see blow) in the alternate > key mode. > {noformat} > 0 -> ^[Op > 1 -> ^[Oq > 2 -> ^[Or > 3 -> ^[Os > 4 -> ^[Ot > 5 -> ^[Ou > 6 -> ^[Ov > 7 -> ^[Ow > 8 -> ^[Ox > 9 -> ^[Oy > - -> ^[Om > . -> ^[On > {noformat} > There is no 'comma' on regular keyboard keypads. So we use the '*' keypad key > press to send the VT100 sequence code: > {noformat} > * -> ^[Ol{noformat} > At least Chrome in my environment (both Windows and macOS) does not > differentiate the regular ENTER and the keypad ENTER (always same code and > location 0), so we use the '+' keypad key to send the VT100 sequence code: > {noformat} > + -> ^[OM{noformat} > The alternate keypad mode can be enabled using the DECKPAM sequence (ESC= aka > ^[=). You can do it manually via the command line: > {code:java} > printf '\033='{code} > You can return to the standard mode (numeric keypad mode) using the DECKPNM > sequence (ESC> aka ^[>). Run the command: > {code:java} > printf '\033>'{code} > On Windows It is important to have NUM LOCK ON on regular keyboards to make > VT100 sequences work correctly. Modern Apple laptops do not have keypads on > them. On macOS, a regular keyboard will always have NUM LOCK ON, because the > OS does not process the key at all and historically never had it on Apple > keyboards. > > *ARROW KEYS* > You can set the DECCKM mode to enable the application sequences: > {code:java} > printf '\033[?1h'{code} > LEFT -> ^[OD > RIGHT -> ^[OC > UP -> ^[OA > DOWN -> ^[OB > You can reset the DECCKM mode to enable the cursor sequences: > {code:java} > printf '\033[?1l'{code} > LEFT -> ^[D > RIGHT -> ^[C > UP -> ^[A > DOWN -> ^[B > ***Use _cat_ to see the code sequences which you send by pressing keyboard > keys: > {code:java} > cat > somefile{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)