File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ public static class Keyboard
2121 [ DllImport ( "__Internal" ) ] static extern bool Keyboard_IsKeyboardSupported ( ) ;
2222 [ DllImport ( "__Internal" ) ] static extern bool Keyboard_IsAnyKeyPressed ( ) ;
2323
24+ public static bool IsKeyboardSupported ( ) => Keyboard_IsKeyboardSupported ( ) ;
25+ public static bool IsAnyKeyPressed ( ) => Keyboard_IsAnyKeyPressed ( ) ;
26+
2427 public static event Action < KeyCode > OnKeyPressed ;
2528 public static event Action < KeyCode > OnKeyReleased ;
2629
Original file line number Diff line number Diff line change 11#import " ../Utils.mm"
22#import < GameController/GameController.h>
3+
34@interface Keyboard : NSObject
5+ +(void )RegisterKeyPressCallback : (LongCallback)callback ;
6+ +(void )RegisterKeyReleaseCallback : (LongCallback)callback ;
7+ +(BOOL )IsKeyboardSupported ;
8+ +(BOOL )IsAnyKeyPressed ;
9+ @end
410
11+ extern " C"
12+ {
513
6- @end
14+ void Keyboard_RegisterKeyPressCallback (LongCallback callback)
15+ {
16+ [Keyboard RegisterKeyPressCallback: callback];
17+ }
18+
19+ void Keyboard_RegisterKeyReleaseCallback (LongCallback callback)
20+ {
21+ [Keyboard RegisterKeyReleaseCallback: callback];
22+ }
23+
24+ bool Keyboard_IsKeyboardSupported ()
25+ {
26+ return [Keyboard IsKeyboardSupported ];
27+ }
28+
29+ bool Keyboard_IsAnyKeyPressed ()
30+ {
31+ return [Keyboard IsAnyKeyPressed ];
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments