Options
enableLayoutCandidatesKeyPress
Enables onKeyPress triggering for layoutCandidate items. When enabled, the onKeyPress callback will be called when layout candidates are selected.
1let keyboard = new SimpleKeyboard({2 enableLayoutCandidates: true,3 layoutCandidates: {4 "o": "ó ò ô ö õ"5 },6 enableLayoutCandidatesKeyPress: true,7 onKeyPress: (button) => {8 console.log('Key pressed:', button);9 // This will also trigger for selected candidates10 }11});12 13// onKeyPress will be called both for regular buttons14// and for selected layout candidates