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

Post bugreports for the Mac OSX version here
pjsmith67
User
User
Posts: 48
Joined: Thu Apr 26, 2018 3:09 pm

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

Post 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
Last edited by pjsmith67 on Mon Jun 09, 2025 3:51 pm, edited 1 time in total.
User avatar
mk-soft
Always Here
Always Here
Posts: 6206
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Canvas keydown returning wrong code for some keys

Post 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
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
pjsmith67
User
User
Posts: 48
Joined: Thu Apr 26, 2018 3:09 pm

Re: Canvas keydown returning wrong code for some keys

Post 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
Post Reply