Skip to content

Commit

Permalink
Resolve KeyCode data type issue on Neko
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Jan 13, 2022
1 parent 2f35e0b commit 4595541
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lime/_internal/backend/native/NativeApplication.hx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ class NativeApplication
if (window != null)
{
var type:KeyEventType = keyEventInfo.type;
var keyCode:KeyCode = keyEventInfo.keyCode;
var int32:Float = keyEventInfo.keyCode;
var keyCode:KeyCode = Std.int(int32);
var modifier:KeyModifier = keyEventInfo.modifier;

switch (type)
Expand Down Expand Up @@ -738,12 +739,12 @@ class NativeApplication

@:keep /*private*/ class KeyEventInfo
{
public var keyCode:Int;
public var keyCode:Float;
public var modifier:Int;
public var type:KeyEventType;
public var windowID:Int;

public function new(type:KeyEventType = null, windowID:Int = 0, keyCode:Int = 0, modifier:Int = 0)
public function new(type:KeyEventType = null, windowID:Int = 0, keyCode:Float = 0, modifier:Int = 0)
{
this.type = type;
this.windowID = windowID;
Expand Down

0 comments on commit 4595541

Please sign in to comment.