Re: Gnu screen: Sending 0xF0, 0xF1 to device

luteijn <luteijn-qWit8jRvyhVmR6Xm/[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
> The author of this application requires me to send special characters 
> like
> 0xF0, 0xF1, .. to my device. Preferably, I would like to be able to do 
> this
> inside GNU screen.

I suppose you could use a combination of 'stuff' and 'bindkey' to 
redefine some of your keys to send these sequences:

You can stuff characters by octal ASCII value, e.g. ":stuff \041" would 
stuff character '!' (convert 041 to decimal: 0 * 64 + 4 * 8 + 1 = 33 ). 
0xF0 would be '360' in octal so you could consider

:bindkey -k F1 stuff \360

This would stuff in 0xf0 each time you pressed F11. See man screen under 
bindkey and stuff for more information on these two friends. Handy 
keys/sequences to 'reprogram' this way are the function keys, some 
ctrl-<key> combinations (ones you don't use for anything else, so 
probably NOT ctrl-a or ctrl-c, but perhaps ctrl-\ or ctrl-_) or 
<esc>-<key> combinations (as you can usually easily enter these by 
pressing alt-<key>, or otherwise hitting <esc> and the <key> in quick 
succession is also easy enough to do)

Hope this helps,
Pieter.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.