Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linux Programming



>    From: Jerry A Clabaugh <JerryC at world.std.com>
> 
>    I've only started learning Linux/UNIX programming in the last year, 
>    having worked in the past on VAX, Pr1mos, Win16 and Win32, and I'm
>    coming along, but there's one thing I can't find info on anywhere:
>    How do you implement command-line recall, like bash does when
>    you hit up-arrow.
> 
> You probably have to capture all keystrokes and implement everything
> yourself.  But you can also use the FSF library that bash uses to do
> it; I believe it's called "readline".  Check the bash sources...
> 

Be careful about binding your application directly to specific key
codes.  I'm not a programmer either, but I believe what you are looking
for needs to be interfaced through terminfo/termcap.

Termcap/terminfo are databases of terminal types, and if you build
your application with these ...  now I don't know what the word is ...
includes/libraries (?) ... anyway, have a look at /usr/include/term.h,
termio.h and termios.h (from Solaris 2.5.1, but linux should have 'em too)

Any comments from the peanut gallery?

- Christoph


***
Subcription/unsubscription/info requests: send e-mail with subject of
"subscribe", "unsubscribe", or "info" to discuss-request at blu.org




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org