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 May 18, 2023
1 parent 4120f37 commit 62a6466
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 @@ -269,15 +269,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 62a6466

Please sign in to comment.