From d2a93f9127bd37dd840586f1a3fde1d3b1fd067a Mon Sep 17 00:00:00 2001
From: martinZuther <martinZuther@b9310e46-f624-0410-8ea1-cfbb3a30dc96>
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/Layers.org        | 178 ++++++++++++++++++++++++++++++++++++
 linux/osd/develop/docs/XKBlib.pdf   | Bin 0 -> 636124 bytes
 linux/osd/develop/docs/XKBproto.pdf | Bin 0 -> 374324 bytes
 linux/osd/develop/xkbtest/Makefile  |  34 +++++++
 linux/osd/develop/xkbtest/xkbtest.c |  29 ++++++
 5 files changed, 241 insertions(+)
 create mode 100644 linux/osd/develop/Layers.org
 create mode 100644 linux/osd/develop/docs/XKBlib.pdf
 create mode 100644 linux/osd/develop/docs/XKBproto.pdf
 create mode 100644 linux/osd/develop/xkbtest/Makefile
 create mode 100644 linux/osd/develop/xkbtest/xkbtest.c

(limited to 'linux/osd/develop')

diff --git a/linux/osd/develop/Layers.org b/linux/osd/develop/Layers.org
new file mode 100644
index 0000000..50361a1
--- /dev/null
+++ b/linux/osd/develop/Layers.org
@@ -0,0 +1,178 @@
+* "xkbmap": setxkbmap de neo -option
+* "xmodmap": setxkbmap lv && xmodmap neo_de.xmodmap
+
+* special layer numbers:
+** 0 --> undefined
+** 7 --> layer 1 with Caps Lock
+** 8 --> layer 2 with Caps Lock
+
+* find current layer
+
+|-----+-----+-------|
+| '1' | 'q' | Layer |
+|-----+-----+-------|
+| 1   | x   |     1 |
+| °   | X   |     2 |
+| ¹   | …   |     3 |
+| ª   | ⋮   |     4 |
+| ₁   | ξ   |     5 |
+| ¬   | Ξ   |     6 |
+| 1   | X   |     7 |
+| °   | x   |     8 |
+|-----+-----+-------|
+
+* layers in "xkbmap"
+
+|------------------+------+------+------+-----------|
+| Modifier / Locks | none | Caps | Mod4 | Caps+Mod4 |
+|------------------+------+------+------+-----------|
+| none             |    1 |    7 |    4 |         4 |
+| Mod3             |    3 |    3 |    6 |         6 |
+| Mod4             |    4 |    4 |    1 |         7 |
+| Mod3+Mod4        |    6 |    6 |    3 |         3 |
+|------------------+------+------+------+-----------|
+| Shift            |    2 |    8 |    0 |         0 |
+| Shift+Mod3       |    5 |    5 |    0 |         0 |
+| Shift+Mod4       |    0 |    0 |    2 |         8 |
+| all              |    0 |    0 |    0 |         0 |
+|------------------+------+------+------+-----------|
+
+
+* plain (xkbmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        1 |       4 |
+| Mod3 on   |        3 |       6 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        2 |       0 |
+| Mod3 on   |        5 |       0 |
+|-----------+----------+---------|
+
+
+* Caps Lock (xkbmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        7 |       4 |
+| Mod3 on   |        3 |       6 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        8 |       0 |
+| Mod3 on   |        5 |       0 |
+|-----------+----------+---------|
+
+
+* Mod4 Lock (xkbmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        4 |       1 |
+| Mod3 on   |        6 |       3 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        0 |       2 |
+| Mod3 on   |        0 |       5 |
+|-----------+----------+---------|
+
+
+* Caps+Mod4 Lock (xkbmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        4 |       7 |
+| Mod3 on   |        6 |       3 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        0 |       8 |
+| Mod3 on   |        0 |       5 |
+|-----------+----------+---------|
+
+
+* layers in "xmodmap"
+
+|------------------+------+------+------+-----------|
+| Modifier / Locks | none | Caps | Mod4 | Caps+Mod4 |
+|------------------+------+------+------+-----------|
+| none             |    1 |    2 |    4 |         0 |
+| Mod3             |    3 |    5 |    3 |         5 |
+| Mod4             |    4 |    0 |    4 |         0 |
+| Mod3+Mod4        |    6 |    6 |    6 |         5 |
+|------------------+------+------+------+-----------|
+| Shift            |    2 |    8 |    0 |         0 |
+| Shift+Mod3       |    5 |    5 |    5 |         5 |
+| Shift+Mod4       |    0 |    0 |    0 |         0 |
+| all              |    6 |    6 |    6 |         5 |
+|------------------+------+------+------+-----------|
+
+
+* plain (xmodmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        1 |       4 |
+| Mod3 on   |        3 |       6 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        2 |       0 |
+| Mod3 on   |        5 |       6 |
+|-----------+----------+---------|
+
+
+* Caps Lock (xmodmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        2 |       0 |
+| Mod3 on   |        5 |       6 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        2 |       0 |
+| Mod3 on   |        5 |       6 |
+|-----------+----------+---------|
+
+
+* Mod4 Lock (xmodmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        4 |       4 |
+| Mod3 on   |        3 |       6 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        0 |       0 |
+| Mod3 on   |        5 |       6 |
+|-----------+----------+---------|
+
+
+* Caps+Mod4 Lock (xmodmap):
+
+|-----------+----------+---------|
+| Shift off | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        0 |       0 |
+| Mod3 on   |        5 |       5 |
+|-----------+----------+---------|
+| Shift on  | Mod4 off | Mod4 on |
+|-----------+----------+---------|
+| Mod3 off  |        0 |       0 |
+| Mod3 on   |        5 |       5 |
+|-----------+----------+---------|
+
+
+#+STARTUP: showall
diff --git a/linux/osd/develop/docs/XKBlib.pdf b/linux/osd/develop/docs/XKBlib.pdf
new file mode 100644
index 0000000..f97397f
Binary files /dev/null and b/linux/osd/develop/docs/XKBlib.pdf differ
diff --git a/linux/osd/develop/docs/XKBproto.pdf b/linux/osd/develop/docs/XKBproto.pdf
new file mode 100644
index 0000000..b9735de
Binary files /dev/null and b/linux/osd/develop/docs/XKBproto.pdf differ
diff --git a/linux/osd/develop/xkbtest/Makefile b/linux/osd/develop/xkbtest/Makefile
new file mode 100644
index 0000000..710c1cd
--- /dev/null
+++ b/linux/osd/develop/xkbtest/Makefile
@@ -0,0 +1,34 @@
+# Makefile
+
+# The compiler to be used
+CC = gcc
+
+# Arguments passed to the compiler: -g causes the compiler to insert
+# debugging info into the executable and -Wall turns on all warnings
+CFLAGS = -g -O2
+
+# The dynamic libraries that the executable needs to be linked to
+LDFLAGS = -lxkbfile
+
+# The Dependency Rules
+# They take the form
+# target : dependency1 dependency2...
+#        Command(s) to generate target from dependencies
+
+# Dummy target that is processed by default. It specifies al list of
+# other targets that are processed if make is invoked with no arguments
+# However if you invoke make as "make output-data", it will only try to 
+# generate the file output-data and its dependencies, not plot.png 
+all : xkbtest
+
+xkbtest : xkbtest.c
+	$(CC) $(CFLAGS) $(LDFLAGS) xkbtest.c -o xkbtest
+
+# The clean target is used to remove all machine generated files 
+# and start over from a clean slate. This will prove extremely
+# useful. It is an example of a dummy target, as there will never be a
+# file named clean. Thus "make clean" will always cause the following
+# command to be executed.
+
+clean :
+	rm -f xkbtest
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 <stdio.h>
+#include <X11/XKBlib.h>
+
+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