lusakasa / saka-key

A keyboard interface to the web
https://key.saka.io
MIT License
862 stars 70 forks source link

Saka key stops global keyup events to the page #245

Open Pajn opened 5 years ago

Pajn commented 5 years ago

When Saka key is active, the page no longer receives keyup events on the document or window object.

Minimal Reproduction:

window.addEventListener('keyup', event => {
  console.log('window keyup', event.key)
})

document.addEventListener('keyup', event => {
  console.log('document keyup', event.key)
})

Here is a jsbin demonstrating the problem: https://jsbin.com/nipijeh/edit?js,console,output

I understand that Saka key might have to block keys which it has its own keybindings mapped to but keys that are "Saka free" (like Tab) should still be forwarded.

This is a replacement for issue #153, I decided to create a new one as the problem is bigger and more focused.

Pajn commented 5 years ago

I commented out https://github.com/lusakasa/saka-key/blob/53460c4e117f23633fec09427fb2ef1f26785234/src/modes/command/client/index.js#L17 and made a local build which works around this problem