Hello
I have a problem with a canvas keyboard released event.
When i hit the "Back" key, in SB, i do some graphical text stuffs, it works.
But, if i upload my program and type its url, the "Back" key shortcut is used by chrome or mozilla to go back on the last url.
Is there a way to by-pass this key conflict ?
(for example in javascript)
Canvas keyboard "KeyBack" & Web explorers
Canvas keyboard "KeyBack" & Web explorers
My Freewares here :
http://retro-bruno.fr/
http://retro-bruno.fr/
Re: Canvas keyboard "KeyBack" & Web explorers
Yes, there is a way, you can take a look to this for example: https://craig.is/killing/mice
It's planed to add this to SB somewhen !
It's planed to add this to SB somewhen !
Re: Canvas keyboard "KeyBack" & Web explorers
Thanks.
I've tried to do this :
But i'm not sure that i access correctly my structure. In SB, i should use : Ar(CursorAtArea)\text
I've replaced antislash by a dot but is it the correct syntax ?
EDIT:
This does nothing too : v_Ar(v_CursorAtArea).v_text
EDIT2:
If forgot to import the .js library, and when i import it as a .sb file with the "!" symbol before the JS lines, my program crash.
But finally, i've changed all to not have to use the backspace key out of a stringgadget.
I've tried to do this :
Code: Select all
; Backspace key
! Mousetrap.bind('backspace', function() {
! if(v_CursorAtArea > 0) {
! var l = v_Ar(v_CursorAtArea).text.length();
! if(l > 0) {
! v_Ar(v_CursorAtArea).text = v_Ar(v_CursorAtArea).text.substring(0, l - 1);
! }
! }
! });
I've replaced antislash by a dot but is it the correct syntax ?
Code: Select all
Structure Area
x.i
y.i
w.i
h.i
text.s
type.i ; #TString, #TValue
align.i ; #ALeft, #ACenter
auto.i ; #Manual, #Auto1, etc...
EndStructure
Global Dim Ar.Area(#AreasNumber)
This does nothing too : v_Ar(v_CursorAtArea).v_text
EDIT2:
If forgot to import the .js library, and when i import it as a .sb file with the "!" symbol before the JS lines, my program crash.
But finally, i've changed all to not have to use the backspace key out of a stringgadget.
My Freewares here :
http://retro-bruno.fr/
http://retro-bruno.fr/