[Done] Return key not working?

Found an issue in SpiderBasic ? Please report it here !
User avatar
Danilo
Posts: 57
Joined: Wed Feb 26, 2014 7:11 am

[Done] Return key not working?

Post by Danilo »

Somehow i can‘t use the Return key. Not inside the editor gadget and not with keyboard shortcuts.

SpiderBasic 3.20 (arm64) macOS, Web target.

Code: Select all

Procedure MenuEvents()
    Debug "Menu event: " + EventMenu()
EndProcedure
  
If OpenWindow(0, 0, 0, 295, 260, "CTRL+F / RETURN Shortcut", #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
    EditorGadget(0, 8, 8, 206, 133)
    SetGadgetText(0, "This is a multiline text to edit" + #LF$ +
                     "in the EditorGadget()." + #LF$ +
                     "Third line")
    
    AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_F, 15)
    ;AddKeyboardShortcut(0, #PB_Shortcut_Return, 16)
    ;AddKeyboardShortcut(0, #PB_Shortcut_F5, 17)
    
    BindEvent(#PB_Event_Menu, @MenuEvents())
EndIf
;While WaitWindowEvent()<>#PB_Event_CloseWindow:Wend
cya,
...Danilo
User avatar
Danilo
Posts: 57
Joined: Wed Feb 26, 2014 7:11 am

Re: Return key not working?

Post by Danilo »

It‘s working when compiled to an web app.
It‘s the WebView panel inside the IDE that doesn‘t work correctly.

Now i can‘t test and develop my app using F5 compilation inside the IDE, i need to create a webapp every time.

I had a feature request to make the WebView panel undockable, so i could move it to another display (like the debug window).
Maybe it can be fixed, so keys (Return, F5) work correctly inside the WebView.
In this case it would be nice when external windows (debugger) would remember the monitor they were opened on last time. ;)
cya,
...Danilo
Fred
Site Admin
Posts: 1868
Joined: Mon Feb 24, 2014 10:51 am

Re: Return key not working?

Post by Fred »

You're right, it will be fixed in the next version as ChrisR did a patch for it (for PureBasic but it solves this issue actually) https://github.com/fantaisie-software/p ... c/pull/368
User avatar
Danilo
Posts: 57
Joined: Wed Feb 26, 2014 7:11 am

Re: [Done] Return key not working?

Post by Danilo »

Thanks Fred! That probably means for SpiderBasic IDE WebView panel:
- When the WebView tool gets focus, all SB IDE keyboard shortcuts need to be removed (inkl. F5, F6, etc.), not only Scintilla.
- When the WebView tool lost focus, all SB IDE keyboard shortcuts need to be set again

Within the WebView we are displaying/running/testing/debugging our own apps and we need all keys for our apps.
I understand the problem now, thanks! The WebView panel must be like a sandbox for our apps, no influence from the SB IDE.
Maybe it would be nice to have the webview as own app. When we press F5 within SB IDE, an external tool window opens and displays the app.
A small server with WebView, written in PureBasic. ;)

It would also be nice when the webview panel would not loose focus when the IDE debugger window opens.
Something like „open debugger window, but don‘t activate the window“. Focus stays in WebView panel, or focus gets back to webview panel after debug window opened.
cya,
...Danilo
Fred
Site Admin
Posts: 1868
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Return key not working?

Post by Fred »

you can make the window floating if you want, or remove it completely, then it will use your browser instead
User avatar
Danilo
Posts: 57
Joined: Wed Feb 26, 2014 7:11 am

Re: [Done] Return key not working?

Post by Danilo »

Fred wrote: Wed Apr 15, 2026 9:40 am you can make the window floating if you want, or remove it completely, then it will use your browser instead
How to make the tool windows floating? I didn’t see that in options, right-click-menu, documentation.
Dragging the [WebView] Tab doesn‘t work. Is there a secret way to make it floating?

I‘m new here, sorry. Do PB/SB support docking now?
Last edited by Danilo on Wed Apr 15, 2026 9:56 am, edited 1 time in total.
cya,
...Danilo
Fred
Site Admin
Posts: 1868
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Return key not working?

Post by Fred »

You go in preferences -> tool panel and your remove it from the tool panel. Then when you select menu Tools -> WebView, it should open as floating. It's a general behaviour for all tools
User avatar
Danilo
Posts: 57
Joined: Wed Feb 26, 2014 7:11 am

Re: [Done] Return key not working?

Post by Danilo »

Fred wrote: Wed Apr 15, 2026 9:53 am You go in preferences -> tool panel and your remove it from the tool panel. Then when you select menu Tools -> WebView, it should open as floating. It's a general behaviour for all tools
Thanks! Now the <Return> key suddenly works in my floating app. :thumbsup:
The floating window just doesn‘t remember it‘s position on monitor 3. It always opens on the main monitor (1).

Okay, much better now with floating window! :thumbsup:

Any chance to remove the white border for the webview panel? Doesn‘t fit in a dark OS theme.
cya,
...Danilo
Fred
Site Admin
Posts: 1868
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Return key not working?

Post by Fred »

Seems to be related to https://www.purebasic.fr/english/viewtopic.php?t=88384 . Should be fixed somewhen !
Post Reply