This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
programming:ncurses [2022/03/19 17:36] nanodano |
programming:ncurses [2022/03/19 23:56] (current) nanodano |
||
|---|---|---|---|
| Line 309: | Line 309: | ||
| + | ==== Modifier keys ==== | ||
| + | <code cpp> | ||
| + | |||
| + | // int c = getch(); | ||
| + | // switch (c) | ||
| + | case ctrl(' | ||
| + | addstr(" | ||
| + | break; | ||
| + | default: | ||
| + | if (c == KEY_ENTER) { | ||
| + | addstr(" | ||
| + | } | ||
| + | if (c == 27) { // Alt key was down when key pressed | ||
| + | // Get the next char that came with the alt | ||
| + | c = getch(); | ||
| + | addstr(" | ||
| + | addch(c); // could be ' | ||
| + | } | ||
| + | |||
| + | </ | ||
| Line 366: | Line 386: | ||
| - | mousemask() // Specify which mouse events to get | + | mousemask(ALL_MOUSE_EVENTS, |
| + | MEVENT // data type with bits set for specific mouse events like BUTTON1_CLICKED | ||
| // Special events from wgetch() | // Special events from wgetch() | ||