Skip to content

Commit

Permalink
fix mouse position not added to EKeyDown and EKeyUp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZwodahS committed Nov 28, 2023
1 parent a11d576 commit 4b58b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hxd/Window.hl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,15 @@ class Window {
case GControllerAdded, GControllerRemoved, GControllerUp, GControllerDown, GControllerAxis:
@:privateAccess hxd.Pad.onEvent( e );
case KeyDown:
eh = new Event(EKeyDown);
eh = new Event(EKeyDown, mouseX, mouseY);
if( e.keyCode & (1 << 30) != 0 ) e.keyCode = (e.keyCode & ((1 << 30) - 1)) + 1000;
eh.keyCode = CODEMAP[e.keyCode];
if( eh.keyCode & (K.LOC_LEFT | K.LOC_RIGHT) != 0 ) {
e.keyCode = eh.keyCode & 0xFF;
onEvent(e);
}
case KeyUp:
eh = new Event(EKeyUp);
eh = new Event(EKeyUp, mouseX, mouseY);
if( e.keyCode & (1 << 30) != 0 ) e.keyCode = (e.keyCode & ((1 << 30) - 1)) + 1000;
eh.keyCode = CODEMAP[e.keyCode];
if( eh.keyCode & (K.LOC_LEFT | K.LOC_RIGHT) != 0 ) {
Expand Down

0 comments on commit 4b58b5c

Please sign in to comment.