From d2a93f9127bd37dd840586f1a3fde1d3b1fd067a Mon Sep 17 00:00:00 2001 From: martinZuther Date: Thu, 10 Sep 2009 23:03:12 +0000 Subject: Neues Programm "OSDneo2": das Python-Script "OSD Neo2" für Linux zeigt auf dem X-Server die gerade verwendete Ebene von Neo2 an. Version 0.12. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@2078 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- linux/osd/develop/xkbtest/xkbtest.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 linux/osd/develop/xkbtest/xkbtest.c (limited to 'linux/osd/develop/xkbtest/xkbtest.c') diff --git a/linux/osd/develop/xkbtest/xkbtest.c b/linux/osd/develop/xkbtest/xkbtest.c new file mode 100644 index 0000000..a5c1412 --- /dev/null +++ b/linux/osd/develop/xkbtest/xkbtest.c @@ -0,0 +1,29 @@ +#include +#include + +int main(int argc, char *argv[]) +{ + int event_rtrn = 0; + int error_rtrn = 0; + int major_in_out = 1; + int minor_in_out = 0; + int reason_rtrn = 0; + + Display * display = NULL; + display = XkbOpenDisplay(NULL, &event_rtrn, &error_rtrn, &major_in_out, + &minor_in_out, &reason_rtrn); + + printf("\n Display handle: %#010x\n", (unsigned int) display); + + XkbStateRec state; + XkbGetState(display, XkbUseCoreKbd, &state); + + printf("\n mods: %x", state.mods); + printf("\n base_mods: %x", state.base_mods); + printf("\n latched_mods: %x", state.latched_mods); + printf("\n locked_mods: %x", state.locked_mods); + printf("\n compat_state: %x", state.compat_state); + + printf("\n\n"); + return 0; +} -- cgit v1.2.3