[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can Control+key code be sent by TerminalView.Input() like Alt+key can?
[Thread Prev] | [Thread Next]
- Subject: Re: can Control+key code be sent by TerminalView.Input() like Alt+key can?
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Thu, 2 May 2024 02:30:39 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Wed, 1 May 2024 at 23:12, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:
> Le 01/05/2024 à 21:24, Bruce Steers a écrit :
> >
> > To send an Alt+key code to TerminalView i do this..
> > for example Alt+u would simply be...
> >
> > TerminalView1.Input("\eu")
> > and then in bash the current word is made uppercase from the cursor.
> >
> > How would i do the same but with Control+u
> > I looked about and found some info
> > https://en.wikipedia.org/wiki/ANSI_escape_code#Terminal_input_sequences
> > <https://en.wikipedia.org/wiki/ANSI_escape_code#Terminal_input_sequences
> >
> >
> > I tried TerminalView1.Input("\e[117;5~")
> > and TerminalView1.Input("\e[5117")
> > and with Hex(117) 75
> >
> > no worky :(
> >
> > is it possible ?
> >
> > Many thanks
> > BruceS
> >
>
> Yes, provided that someone writes the code to handle all the missing
> keyboard sequences in the 'TerminalFilter_VT100.InputTo()' method.
>
> Regards,
>
> --
> Benoît Minisini.
>
eek i only want to input the key code to bash and let bash do all the work
;)
i found this ascii table
https://www.physics.udel.edu/~watson/scen103/ascii.html
Ctrl-U is Hex 15
TrminalView1.Input.("\x15") Does as expected, deletes line left of cursor
would i need to implement it for all keys?
after research i find a control key is ascii key code And 0x1F
and i find yes Hex(Asc("U") And &1F) is 15
but how do i convert Hex(Asc("U") And &1F) into string "\x15" i can input?
I tried something like this but it failed...
Dim s As String = "\x" & Hex(Asc("U") And &1F)
TerminalView1.Input(s)
But done correctly something like that should work for all the other keys
too right?
Respects
BruceS
| Re: can Control+key code be sent by TerminalView.Input() like Alt+key can? | Bruce Steers <bsteers4@xxxxxxxxx> |
| can Control+key code be sent by TerminalView.Input() like Alt+key can? | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: can Control+key code be sent by TerminalView.Input() like Alt+key can? | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |