scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.46k stars 3.55k forks source link

Reports that iPad hardware keyboards are not triggering Scratch keypresses #4244

Open benjiwheeler opened 5 years ago

benjiwheeler commented 5 years ago

See discussion: https://scratch.mit.edu/discuss/topic/329379

image

paulkaplan commented 5 years ago

I was able to repro some issues with an apple bluetooth keyboard connected to an iPad. specifically:

paulkaplan commented 5 years ago

Wow this is very new to me. The bluetooth keyboard keyup event does not contain the key property, instead it sets the key="Dead"... but it does send the correct keyCode. We are already sending both key and keyCode to the VM, but the VM only uses key. We should be able to use the keyCode if the key==="Dead". Bizarre...

paulkaplan commented 5 years ago

going to re-open this issue, https://github.com/LLK/scratch-gui/pull/5115 did not fix it because the VM does not allow keycodes from the post IO data, i was misreading the code (it allows key codes from the blocks, but not from post data). We can convert the keycode in this GUI line instead.

lihongtao2012 commented 4 years ago

Did the blogger solve it? I downloaded your project. It's not easy to use