diff -r c296edace64a -r cce151e4bf3d src/main.cpp --- a/src/main.cpp Tue Nov 17 20:21:11 2020 +0100 +++ b/src/main.cpp Mon Nov 23 21:55:40 2020 +0100 @@ -255,6 +255,8 @@ // this should be called as a result of the HP_RST pin going LO printf("Reset connection to the main unit\n"); if (DigitalIn(HP_RST).read() == 0) { + byescreen_timer.detach(); // cancel a "poweroff", if any + if (hp == NULL) { printf("setup HP communication handler\r\n"); hp = new HPSerial(HP_TX, HP_RX); @@ -335,8 +337,12 @@ if ((keycode == KC_SHIFT) && (key.keyevent == KEY_PRESSED)) { - shift = true; - dsp->set_flag_status(0x0E, true); + // toggle the shift indicator + if (shift) + shift = false; + else + shift = false; + dsp->set_flag_status(0x0E, shift); dsp->draw_flag(0x0E); }