bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Expose arrow key codes with modifiers


From: Katharina Fey
Subject: [PATCH] Expose arrow key codes with modifiers
Date: Thu, 8 Nov 2018 15:40:21 +0100

hello,

this patch exposes ctrl+[left|right]arrow and alt+shift+[left|right]arrow
as key codes via `cursive.h`. These events are supported by ncurses, but
were not exported as such. There are however libraries that grabbed the
events manually[1].

This change will allow more applications to take advantage of these codes
without having to grab the events themselves.

Note: this patch breaks the pretty formatting on the Caps table because
      the `key_asrght` identifier is too long. I decided against changing
      the formatting for now, to avoid submitting a several thousand line
      long patch. If you _do_ feel that this should be done, I will very
      happily provide an updated patch for you.


greetings,
spacekookie


--- ncurses-6.1-20181027/include/Caps   2016-08-13 19:45:50.000000000 +0200
+++ currrrrrrses/include/Caps   2018-11-08 15:34:22.666900703 +0100
@@ -376,9 +376,13 @@
 insert_character               ich1    str     ic      -               -       
YBCGE   insert character (P)
 insert_line                    il1     str     al      -               -       
YBCGE   insert line (P*)
 insert_padding                 ip      str     ip      -               -       
YBCGE   insert padding after inserted character
+key_asleft                     kasleft         str     Al      KEY_ASLEFT      
0552    -B-G-*  alt and shift and left arrow key
+key_asright                    kasright        str     Al      KEY_ASRIGHT     
0567    -B-G-*  alt and shift and right arrow key
 key_backspace                  kbs     str     kb      KEY_BACKSPACE   0407    
YB-G-   backspace key
 key_catab                      ktbc    str     ka      KEY_CATAB       0526    
-B-G-*  clear-all-tabs key
+key_cleft                      kcleft  str     cl      KEY_CLEFT       0553    
-B-G-*  control and left arrow key
 key_clear                      kclr    str     kC      KEY_CLEAR       0515    
-B-G-*  clear-screen or erase key
+key_cright                     kcright str     cr      KEY_CRIGHT      0568    
-B-G-*  control and right arrow key
 key_ctab                       kctab   str     kt      KEY_CTAB        0525    
-B-G-*  clear-tab key
 key_dc                         kdch1   str     kD      KEY_DC          0512    
YB-G-   delete-character key
 key_dl                         kdl1    str     kL      KEY_DL          0510    
-B-G-*  delete-line key

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]