[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Jeg kigger på et NCurses program jeg ikke selv har lavet. Tastetryk identificeres udfra noget a la -------------------------------- switch (ch) { case KEY_F(1): ... do something ...; break; case KEY_LEFT: ... do something ...; break; case 'r': ... do something ...; break; default: ... do something ...; break; } --------------------------------- Hvor er disse KEY_F(1) og KEY_LEFT defineret?
Hvordan identificerer jeg f.eks. tastekombinationerne:
ALT-k
# define K_ALTA 0x61 # define K_ALTB 0x62 # define K_ALTC 0x63 # define K_ALTD 0x64 # define K_ALTE 0x65 # define K_ALTF 0x66 # define K_ALTG 0x67 # define K_ALTH 0x68 # define K_ALTI 0x69 # define K_ALTJ 0x6a # define K_ALTK 0x6b # define K_ALTL 0x6c # define K_ALTM 0x6d # define K_ALTN 0x6e # define K_ALTO 0x6f # define K_ALTP 0x70 # define K_ALTQ 0x71 # define K_ALTR 0x72 # define K_ALTS 0x73 # define K_ALTT 0x74 # define K_ALTU 0x75 # define K_ALTV 0x76 # define K_ALTW 0x77 # define K_ALTX 0x78 # define K_ALTY 0x79 # define K_ALTZ 0x7a
ALT-F12
SHIFT-F12
# define K_SF1 '!' # define K_SF2 '@' # define K_SF3 '#' # define K_SF4 '$' # define K_SF5 '%' # define K_SF6 '^' # define K_SF7 '&' # define K_SF8 '*' # define K_SF9 '(' # define K_SF10 ')' # define K_SF11 '_' # define K_SF12 '+'
Kilde: http://cvs.sourceforge.net/viewcvs.py/maximus/maximus/slib/keys.h?rev=1.5&view=markup
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |