On Linux using NCurses (version 5.9) the keys KEY_SLEFT and KEY_SRIGHT are defined, however KEY_SUP and KEY_SDOWN are missing.
Since I have Windows and PDCurses installed on the same computer, I saw that with PDCurses all shifted arrow keys are defined.
I opened "curses.h" and noted down their definitions this is what my notes look like:
As you can see from this table, the normal arrow key definitions match on both platforms.
However 2 shifted keys are missing on Linux and the other 2 aren't the same number - on Linux they are increased by 2.
I tried adding #define KEY_SUP 0x223 , #define KEY_SUP 547 , #define KEY_SUP 549 , but none of these worked.
Has anybody got a solution?
Your distro might be broken there. You might want to go complain on their site.
Before you do, though, you might want to set up a keylogger and figure out exactly what the codes are that your xkbd is sending through to ncurses. Once you do, you can update your terminfo database and curses.h, and tell those you complain to how to do it....
Normally shift left/right refers to the left or right shift buttons, not the combination of shift + arrow keys. I have no idea what shift up/down are though, so perhaps I m mistaken.
I see your point there. This means SLEFT and SRIGHT on Linux refer to the shift buttons like ModShop said, but on Windows they mean a combination of shift + arrow key. Any way to capture shifted arrow keys on Linux?