1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Dump window size in Keys example

This commit is contained in:
Rhys Weatherley 2016-03-12 12:37:13 +10:00
parent ab914c4d07
commit fcf875f9fd

View File

@ -90,6 +90,12 @@ void loop()
term.print("Unicode: U+"); term.print("Unicode: U+");
term.print(term.unicodeKey(), 16); term.print(term.unicodeKey(), 16);
term.println(); term.println();
} else if (key == KEY_WINSIZE) {
// Change in window size.
term.print("New window size: ");
term.print(term.columns());
term.print("x");
term.println(term.rows());
} else if (key >= 0 && key <= 0xFF) { } else if (key >= 0 && key <= 0xFF) {
// Special arrow or function key. // Special arrow or function key.
const uint8_t *table = (const uint8_t *)keys; const uint8_t *table = (const uint8_t *)keys;