AddKeyboardShortcut not working when having a webgadget with flag #PB_Web_Edge
Posted: Wed Dec 11, 2024 4:11 am
When setting #PB_Web_Edge flag, keyboard shortcuts are not working anymore.
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
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