I’m having trouble reading arrow keys from my Mac keyboard, when LeftControl or RightControl is down.
They work when LeftControl is not down.
( thanks to Hezkore for example)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Import "<std>"
# Import "<mojo>"
Using std . .
Using mojo . .
Class MyWindow Extends Window
Method New ( title : String = "Simple mojo app" , width : Int = 640 , height : Int = 480 , flags : WindowFlags = Null )
Super . New ( title , width , height , flags )
End
Method OnRender ( canvas : Canvas ) Override
App . RequestRender ( )
canvas . DrawText ( "Hold 'left control' and press 'arrow key left'" , Width / 2 , Height / 2 , . 5 , . 5 )
If Keyboard . KeyDown ( Key . Left ) Then
canvas . DrawText ( "IT WORKS- try pressing Left or Right control !" , Width / 2 , Height / 2 + 13 , . 5 , . 5 )
Endif
End
End
Function Main ( )
New AppInstance
New MyWindow
App . Run ( )
End