473,387 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

GNU Readline question (needed for tintin++ modifications)

Hello,

I have been going through the source code of tintin to see about
adding key bindings. In working with this I found an issue with how
keybindings work in GNU readline. The problem is that function keys
have to be bound as sequences, but on my keyboard F5 has a sequence
that ends with '~', as does F6 - F12.

The way I would expect to code in "on the fly" key binding in tintin
involves having all user defined key bindings to call the same
function, but the function will have to know which key called it.
Since all you get in the callback is a count number and a number
representing the *last* key in the sequence I don't see anyway to tell
F5 from F12, for example.

I can certainly have a function for each key but I would like to avoid
this if possible. Does anyone know a way to do this? I hate to go
messing around with the readline implimentation to put something in
for this.

Thanks in advance,
Jason
Nov 13 '05 #1
1 1528
On 17 Oct 2003 20:57:19 -0700, az********@hotmail.com (Jason) wrote in
comp.lang.c:
Hello,

I have been going through the source code of tintin to see about
adding key bindings. In working with this I found an issue with how
keybindings work in GNU readline. The problem is that function keys
have to be bound as sequences, but on my keyboard F5 has a sequence
that ends with '~', as does F6 - F12.

The way I would expect to code in "on the fly" key binding in tintin
involves having all user defined key bindings to call the same
function, but the function will have to know which key called it.
Since all you get in the callback is a count number and a number
representing the *last* key in the sequence I don't see anyway to tell
F5 from F12, for example.

I can certainly have a function for each key but I would like to avoid
this if possible. Does anyone know a way to do this? I hate to go
messing around with the readline implimentation to put something in
for this.

Thanks in advance,
Jason


What's your question about the C language? You are severely off-topic
here.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: michele.simionato | last post by:
This a case where the documentation is lacking. The standard library documentation (http://www.python.org/dev/doc/devel/lib/module-rlcompleter.html) gives this example try: import readline...
67
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
8
by: Danny Smith | last post by:
Hi, I need to read a file and be able to: 1. Find the current position in the stream 2. Have access to a handy ReadLine() method. Obviously the FileStream class supports random access, so...
4
by: alberto | last post by:
In this code for a console application: int n; n = Console.Read(); Console.WriteLine(n); Console.ReadLine();
1
by: Kevin | last post by:
In a newsgroup thread from Jan 8, 2003 between Barry Holsinger and the VBDotNet Team, please review this excerpt: "You understood my problem completely. Your sample code provides a really...
2
by: Grant Edwards | last post by:
I'm trying to figure out how to use the gnu readline library so that when my program is prompting the user for input there is line editing and history support. I've read and re-read the...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.