hardware keycode
- From: Peter Gasper <pgasper designadvantage com>
- To: gtk-app-devel-list gnome org
- Subject: hardware keycode
- Date: 18 Aug 2003 14:37:45 -0600
I am creating an GdkEvent manually. How do I determine the hardware keycode for a
key in gdk/gdkkeysyms.h so I can fill in the value?
Or is that something which is dependent on the installation/system? If so how? Is
there a way to discover the hardware keycodes at runtime?
I tried using gdk_keymap_get_entries_for_keyval to do this but I got segfaults in the else portion of the
following code.
GdkKeymapKey **keys;
gint *n_keys;
if( !gdk_keymap_get_entries_for_keyval(NULL, GDK_1, keys, n_keys) )
{
cout << "Keyval translation failed." << endl;
}
else
{
cout << *n_keys << endl;
cout << "hardware_keycode: " << keys[0]->keycode << endl;
cout << "group: " << keys[0]->group << endl;
cout << "level: " << keys[0]->level << endl;
cout << "done" << endl;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]