Page 1 of 1

[PB 6.20] Canvas keydown returning wrong code for some keys

Posted: Mon Jun 09, 2025 12:41 am
by pjsmith67
The following code snippet returns the same key code for "," and "." on MacOS 14.5.7. It also appears to happen on 15.5

Original discussion: viewtopic.php?p=641913#p641913

Phil

Code: Select all

OpenWindow(0,10,10,800,600,"")
CanvasGadget(1,0,0,800,600,#PB_Canvas_Keyboard)
While WaitWindowEvent()<>#PB_Event_CloseWindow
	If EventType()=#PB_EventType_KeyDown
		Debug "canvas key="+Str(GetGadgetAttribute(1,#PB_Canvas_Key))
	EndIf
Wend

Re: Canvas keydown returning wrong code for some keys

Posted: Mon Jun 09, 2025 11:02 am
by mk-soft
I have connected a German Windows keyboard (QWERTZ).

With #PB_Canvas_Input
When choosing DE (Windows) or QZ (Mac) works for me (,) and (.)
On the ten block also comes how should the (,)

With #PB_Canvas_Key the same Bug

Re: Canvas keydown returning wrong code for some keys

Posted: Mon Jun 09, 2025 3:32 pm
by pjsmith67
Yes, input works. I switched to that. Probably should have been using that from the beginning.

It appears to be a MacOS bug as it works on my Windows 10 machine.

Phil