Control of Text Fields.

Alex Tweedly alex at
Thu Nov 4 20:53:56 EDT 2021

Hi Roger,

I'm not sure I properly understand your question.

here's a code snippet the moves the insertion point (in this sample, 
typing an 'f' moves it forward, 'b' moves it back). (Note this also 
works if there is some text selected - it moves the insertion to just 
after the selection, just like the arrow key does).

> on keydown p
>    local t
>    switch p
>       case  "f"
>          put word 4 of the selectedchunk into t
>          select after char (t+1) of me
>          break
>       case "b"
>          put word 2 of the selectedchunk into t
>          select before char (t-1) of me
>          break
>    end  switch
> end keydown
To then delete the char in front of it, you'd do something like

    put empty into char (t+1) of me

Hope that's close enough to what you were asking, or at least gives you 
a starting place  :-),


On 04/11/2021 20:49, Roger Guay via use-livecode wrote:
> I simply want to be able to move the insertion iBeam in a focused field left and right, one char at a time (just like the left and right arrows keys), and then to delete the char in front of it (just like the Delete key). The dictionary was again of no use to me. Can someone please provide sample scripts?
> Thanks,
> Roger
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list