Emit Trace Event (if enabled and turned on) for handling of key events

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib38252197d9a6597d88622b0b965ad026bb53fcb
This commit is contained in:
Tor Lillqvist 2021-06-15 12:38:32 +03:00 committed by Tor Lillqvist
parent 93ca2c8c84
commit 3b32aa667e

View file

@ -242,6 +242,7 @@ L.Map.Keyboard = L.Handler.extend({
if (this._map.uiManager.isUIBlocked())
return;
var completeEvent = app.socket.createCompleteTraceEvent('L.Map.Keyboard._onKeyDown', { type: ev.type, charCode: ev.charCode });
console.log('keyboard handler:', ev.type, ev.key, ev.charCode, this._expectingInput, ev);
if (ev.charCode == 0) {
@ -252,6 +253,8 @@ L.Map.Keyboard = L.Handler.extend({
this._map._docLayer.shiftKeyPressed = true;
else if (ev.keyCode === 16 && ev.type === 'keyup')
this._map._docLayer.shiftKeyPressed = false;
if (completeEvent)
completeEvent.finish();
},
_globalKeyEvent: function(ev) {