Page 1 of 1

MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 10:36 am
by mk-soft
When using keyboard control commands in FullScreen, the beep always occurs.

Example PitchYaw.pb

Re: MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 3:38 pm
by skinkairewalker

Re: MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 3:48 pm
by mk-soft
Yes :cry:

Re: MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 4:33 pm
by skinkairewalker
is it the same principle that is acting in the webview?

viewtopic.php?t=81617

Re: MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 8:29 pm
by skinkairewalker
prevent the beep using this : viewtopic.php?p=453973&hilit=keyboard+beep#p453973

precisely, using this code:

Code: Select all

ProcedureC PerformKeyEquivalent(Sender, sel, event)
  
  Static lastEvent
  Protected currentevent = event
   Protected result = #YES  
   If currentEvent = lastEvent : ProcedureReturn result : EndIf
   lastEvent = currentEvent

;    If currentEvent
;       Select CocoaMessage(0, currentEvent, "type")
;          Case #NSKeyDown
;             Debug "KeyDown : keyCode = " + CocoaMessage(0, currentEvent, "keyCode")
;             Define Long = CocoaMessage(0, currentEvent, "characters")
;             CocoaMessage(@Long, Long, "UTF8String")
;             Debug "KeyDown : keyChar = " + Asc(PeekS(Long, -1, #PB_UTF8))
;          
;          Case #NSKeyUp
;             Debug "KeyUp : keyCode = " + CocoaMessage(0, currentEvent, "keyCode")
;          
;      ;    Case #NSFlagsChanged ; SHIFT, CMD, ALT, CTRL, CAPS
;      ;       Debug "Flags : " + Bin(CocoaMessage(0, currentEvent, "modifierFlags"))
;          
;       EndSelect
;     EndIf
  
  ProcedureReturn #NO 
EndProcedure

Re: MacOS: Keyboard beep at FullScreen

Posted: Sat May 13, 2023 8:34 pm
by skinkairewalker
but that led to another problem...
now operating system shortcuts are activated, for example : CTRL + DOWN or CTRL + UP all ( these 2 commands open all open windows on the desktop )