| 151 | return null |
| 152 | } |
| 153 | function pressKey(client, key, shift = false) { |
| 154 | const code = key.length === 1 ? `Key${key.toUpperCase()}` : key |
| 155 | return evaluate(client, `(() => { window.dispatchEvent(new KeyboardEvent('keydown', { key: ${JSON.stringify(key)}, code: ${JSON.stringify(code)}, shiftKey: ${shift}, bubbles: true, cancelable: true })); return true; })()`) |
| 156 | } |
| 157 | /** The data-sidebar-idx of the currently vim-highlighted sidebar row (or null). */ |
| 158 | function cursorState(client) { |
| 159 | return evaluate(client, `(() => { |