• Jesper Dam's avatar
    Better key identifiers · c3f60524
    Jesper Dam authored
    Previously we identified keys in keyboard events by the 'key' property
    if it was set, and 'keyCode' otherwise.
    
    This turns out to be problematic as Firefox no longer leaves 'key'
    undefined (so we fall back to using 'keyCode'), but instead sets 'key'
    to 'MozPrintableKey' for all printable keys.
    
    This meant that when (printable) keys are released, we can't match it
    against the corresponding keydown event, and instead just send a keyup
    event for the last keydown received.
    
    Now, if both 'key' and 'keyCode' are set, use the concatenation of both.
    Otherwise prefer 'keyCode', as that is at least unique for every key.
    
    This should let us release the right keys on keyup events.
    c3f60524
Name
Last commit
Last update
debian Loading commit data...
docs Loading commit data...
images Loading commit data...
include Loading commit data...
tests Loading commit data...
utils Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
LICENSE.txt Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
vnc.html Loading commit data...
vnc_auto.html Loading commit data...