fix keybind for pi

stable
Valerie 2021-08-23 17:33:41 -04:00
parent 0214e0c86b
commit c8ea303b09
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ export default function Multiview(props: Props) {
}, [screens, screenIdx]);
useInput((key) => {
// on raspi its ^[[[A, no idea why...
if(key.startsWith('^[')) key = key.substr(2);
// F1 === [[A, F2 === [[B ... F5
if(['[[A', '[[B', '[[C', '[[D', '[[E'].includes(key)) {
const newIdx = key.charCodeAt(2) - 65;