Re: Fwd: Reprogramming keyboard keys

Hi Kjell,

Maybe I misexplained the problem... that it's not GdkEventKey.keyval related (and the #defined values in gdk/gdkkeysyms.h)...

In the last message, what I tried to ask for is the way to know the current keyboard (the physical one) configuration at the level of keys. More exactly, I need to know the value of each physical key will return.... and for that, I mentioned the gdk_keymap_* functions.

According the GDK reference:
gdk_keymap_get_entries_for_keycode (...)  Returns the keyvals bound to hardaware_keycode...

In fact, my question is if exists another alternative, closer to Gtkmm/Gdkmm or must use 
(almost, for the moment) this Gdk one.

2016-10-30 19:44 GMT+01:00 Kjell Ahlstedt <kjell ahlstedt bredband net>:

There is an alternative, but it's not closer to gdkmm.
The description of GdkEventKey.keyval at says: "See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes." If you haven't downloaded the source of gtk+, you can look in the git repository:


Den 2016-10-30 kl. 17:05, skrev Glus Xof:
Hi guys,

Thanks to all of you, again... so now, I'm understanding better... but in fact to solve all the entire problem, It just rests to obtain the *current* keyvals attached to each physical key. For that, I don't know if must to use the gdk_keymap_* functions (i.e. gdk_keymap_get_entries_for_keycode()...) or there is an alternative closer to Gdkmm.


2016-10-30 13:17 GMT+01:00 Kjell Ahlstedt <kjell ahlstedt bredband net>:

There is an alternative:

entry.signal_key_press_event().connect(sigc::mem_fun (*this, &MainWindow::get_key_info), false);

i.e. after==false in the call to Glib::SignalProxy::connect().

Have you seen what's said about keyboard events in the gtkmm tutorial?


Den 2016-10-30 kl. 10:46, skrev Glus Xof:
Thanks Phil, that's it !


2016-10-30 1:20 GMT+02:00 Phil Wolff <adiabat centurylink net>:
Try this modification of your example:

On 10/29/2016 02:46 PM, Glus Xof wrote:
Hi Ian,

Thanks again but... I honestly don't see how to solve my problem...

What I really need is to catch the value when a key is pressed... not merely to know when the *entry* value has changed: What can I do from that ?...and How to know which value has changed ?. You see what I mean ?

Please, take this piece of code, and you'd verify that the handler "get_key_info" is not called when a key is pressed. And the question is... How to force it ?



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