Open okbob opened 3 years ago
The integration of the GNU readline compat APIs, like the custom callbacks, is in a very raw and limited state. I tested them at one point three years when I first attempted to include them. It's however not something I've prioritized, and reception for it has been non-existent, so I'm not surprised your example doesn't work.
Editline is a very limited library, but cursor keys does work, provided it is built with --enable-arrow-keys
, which is the configure default.
čt 5. 8. 2021 v 18:24 odesílatel Joachim Wiberg @.***> napsal:
The integration of the GNU readline compat APIs, like the custom callbacks, is in a very raw and limited state. I tested them at one point three years when I first attempted to include them. It's however not something I've prioritized, and reception for it has been non-existent, so I'm not surprised your example doesn't work.
Editline is a very limited library, but cursor keys does work, provided it is built with --enable-arrow-keys, which is the configure default.
ok
When I run my example, then and when I press cursor keys, then I see ^[[D for left, and ^[[C for right key. So it looks like when I use callback functions, then cursor keys are not recognized.
This behaviour is consistent if I use or don't use wide chars.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/troglobit/editline/issues/55#issuecomment-893592991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO4YIDVY5BKTM7FEHFK3T3K3MJANCNFSM5BUEHMWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
OK, maybe someone else is interested in helping out to fix this issue. Pull requests and patches are welcome! :)
I'm not sure about rl_point
or rl_end
, but I've added support for those arrow keys in #70.
I try to use alternative API
I am able to build this example, but the variables
rl_point
andrl_end
are always zero. Unfortunately editline doesn't decode cursor keys or other control keys.Is this functionality supported? I try to use editline from ncurses application.
tested on FC34