Mailinglist Archive: yast-devel (12 mails)

< Previous Next >
Re: [yast-devel] Cant capture key events using libyui in ncurses mode
Am 12.05.2011 09:52, schrieb Rajender Reddy:
Hi,

I am developing a tool in ncurses mode and in c++ using yast2-libyui on SLES
11.0.

I want to do following in my app:

1. If user presses enter or return key when entering text in Input Field, I
want to trigger some action in app.
The option `notify has to be set for the InputField to get events if the user presses a key. At the moment a ValueChanged event is sent for any user input. From source code I can see that for the return key an Activated event is assigned but is overwritten later with ValueChanged.
I have attached the patch for NCInputField.cc to avoid this. I will provide yast2-ncurses containing the patch for SLES11-SP2.

2. I want to make navigation between widget items using arrow keys instead of
tab or shift+tab keys. My dialog contains combo box, input field, buttons,
selection box and table.

I tried setSendKeyEvents( bool doSend ). but no luck. only selection box widget
sending event for left, right arrow key presses.
Yes, sendKeyEvents are only available for the selection box widget. They were implemented for easier use of the text mode control center and the file selection widgets (switching between 2 selection boxes).

Regards
Gabi



Regards

Rajender Reddy Kompally
Software Engineer

Saven Technologies: A leader in technology driven business solutions
-----------------------------------------------------------------------------------
#302, 3rd Floor, MyHome Sarovar Plaza, Hyderabad- 500 063, India

Off: +91 040 23237303/7304 ext 115 | Mobile: +91 99898 26628

E-mail: rajender.reddy@xxxxxxxxxxxxx | Web: www.saventech.com


--
Gabriele Mohr
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5 Tel: +49 911 740 53 362
90409 Nürnberg Email: gs@xxxxxxx
-----------------------------------------------------------------
Index: NCInputField.cc
===================================================================
--- NCInputField.cc (Revision 63576)
+++ NCInputField.cc (Arbeitskopie)
@@ -457,7 +457,8 @@
break;

case KEY_RETURN:
-
+ update = false;
+
if ( notify() || returnOnReturn_b )
ret = NCursesEvent::Activated;

< Previous Next >
List Navigation
References