Options
enableLayoutCandidatesKeyPress
Enables onKeyPress triggering for layoutCandidate items. When enabled, the onKeyPress callback will be called when layout candidates are selected.
{\n console.log('Key pressed:', button);\n // This will also trigger for selected candidates\n }\n});\n\n// onKeyPress will be called both for regular buttons\n// and for selected layout candidates","language":"javascript","showLineNumbers":"false","theme":"light","highlightLines":"","fileName":"","showCopyButton":"true","showHeader":"false"},"displayName":"Code Snippet"},"specializedType":"code-block"}" data-specialized-type="code-block" class="json-block">
let keyboard = new SimpleKeyboard({ enableLayoutCandidates: true, layoutCandidates: { "o": "ó ò ô ö õ" }, enableLayoutCandidatesKeyPress: true, onKeyPress: (button) => { console.log('Key pressed:', button); // This will also trigger for selected candidates } }); // onKeyPress will be called both for regular buttons // and for selected layout candidates
Language: javascript | Theme: light | Line Numbers: false