Page 1 of 1

AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge

Posted: Wed Dec 11, 2024 4:11 am
by Oliver13
When setting #PB_Web_Edge flag, keyboard shortcuts are not working anymore.

Code: Select all

#win=0
#web=1

    OpenWindow(#win,0,0,1024,768,"Test")

   If IsWindow(#win)
     AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut_Shift|#PB_Shortcut_I,100)
     AddKeyboardShortcut(#win,#PB_Shortcut_Control|#PB_Shortcut_Pad0,100);
     
     html$="<html><body>Activate your numpad on keyboard<br>Press CRTL+SHIFT+I<br>Press CRTL+0 (on numpad)</body></html>"
     
   WebGadget(#web,0,0,1024,768,"",#PB_Web_Edge);- Shortcuts not working
   ; WebGadget(#web,0,0,1024,768,"")             ;- Shortcuts work
    
    SetGadgetItemText(#web,#PB_Web_HtmlCode ,html$)

     Repeat
        we = WaitWindowEvent()
      
      Select we
        Case #PB_Event_Menu 
        	 iev=EventMenu()
	        MessageRequester("Hotkey",Str(iev),#MB_APPLMODAL)
        
        Case #PB_Event_CloseWindow  ; If the user has pressed on the close button
	      Quit = 1
      EndSelect

  Until Quit = 1
CloseWindow(#win)
EndIf
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)

Re: AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge

Posted: Wed Dec 11, 2024 9:51 am
by BarryG
Not a bug. Shift+Ctrl+I is a reserved hotkey in Edge -> https://support.microsoft.com/en-au/mic ... fe2713cfad

So you can't use it with the #PB_Web_Edge flag in a WebGadget.

Re: AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge

Posted: Thu Dec 12, 2024 7:36 am
by Oliver13
Thank you for this info, I was not aware of this yet.

But:the problem also occurs with key combinations that are not reserved by system, for example when using #PB_Shortcut_Control|#PB_Shortcut_Pad0.
I also was not able to find any working key combination with edge mode yet.

So I think, that there is despite a bug.

I've modified my initial sample for demonstration