TIP: Click on subject to list as thread! ANSI
echo: fmail_help
to: Wilfred van Velzen
from: Oli
date: 2023-02-23 13:13:00
subject: Linux / 5D

Wilfred wrote (2023-02-23):

 WvV> Hi Oli,

 WvV> On 2023-02-23 11:33:38, you wrote to me:

 Ol>> I've compiled it with conio.h from
 Ol>> https://github.com/casualsnek/linuxconio
 Ol>> on Linux and this is what I get when pressing

 Ol>> UP
 Ol>> DOWN
 Ol>> F1
 Ol>> F2
 Ol>> INS
 Ol>> DEL

 Ol>> $ ./getchtest-linuxconio
 Ol>>    27 - 0000001B - '
 Ol>>    91 - 0000005B - '['
 Ol>>    65 - 00000041 - 'A'
 Ol>>    27 - 0000001B - '
 Ol>>    91 - 0000005B - '['
 Ol>>    66 - 00000042 - 'B'
 Ol>>    27 - 0000001B - '
 Ol>>    79 - 0000004F - 'O'
 Ol>>    80 - 00000050 - 'P'
 Ol>>    27 - 0000001B - '
 Ol>>    79 - 0000004F - 'O'
 Ol>>    81 - 00000051 - 'Q'
 Ol>>    27 - 0000001B - '
 Ol>>    91 - 0000005B - '['
 Ol>>    50 - 00000032 - '2'
 Ol>>   126 - 0000007E - '~'
 Ol>>    27 - 0000001B - '
 Ol>>    91 - 0000005B - '['
 Ol>>    51 - 00000033 - '3'
 Ol>>   126 - 0000007E - '~'

 WvV> That's a strange result, but something for later, when I'm converting
 WvV> fconfig to linux. ;-)

ANSI escape codes? To make it more fun, there are different codes depending on the terminal:

https://invisible-island.net/xterm/xterm-function-keys.html

And Linux text console (no GUI) uses yet another escape sequence for the F-keys.

---
                                                                                       
* Origin: War is Peace. Freedom is Slavery. Ignorance is Strength. (2:280/464.47)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.