AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge

Just starting out? Need help? Post your questions and find answers here.
Oliver13
User
User
Posts: 90
Joined: Thu Sep 30, 2010 6:40 am

AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge

Post 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)
Last edited by Oliver13 on Thu Dec 12, 2024 7:38 am, edited 1 time in total.
BarryG
Addict
Addict
Posts: 4178
Joined: Thu Apr 18, 2019 8:17 am

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

Post 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.
Oliver13
User
User
Posts: 90
Joined: Thu Sep 30, 2010 6:40 am

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

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