[SCM] jack-keyboard/master: Add Dvorak layout support.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Mon Jan 24 11:27:55 UTC 2011


The following commit has been merged in the master branch:
commit aa67e945625dc40b7c88a1c00cfeba2fa7bcdfb5
Author: Alessio Treglia <alessio at debian.org>
Date:   Mon Jan 24 12:27:50 2011 +0100

    Add Dvorak layout support.

diff --git a/debian/patches/0001-dvorak_layout.patch b/debian/patches/0001-dvorak_layout.patch
new file mode 100644
index 0000000..fc67587
--- /dev/null
+++ b/debian/patches/0001-dvorak_layout.patch
@@ -0,0 +1,96 @@
+Description: Add Dvorak layout support.
+Origin: upstream, http://jack-keyboard.svn.sourceforge.net/viewvc/jack-keyboard?view=revision&revision=10
+---
+ src/jack-keyboard.c |    4 +--
+ src/pianokeyboard.c |   53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 55 insertions(+), 2 deletions(-)
+
+--- jack-keyboard.orig/src/jack-keyboard.c
++++ jack-keyboard/src/jack-keyboard.c
+@@ -1696,7 +1696,7 @@ usage(void)
+ 	fprintf(stderr, "   where <channel> is MIDI channel to use for output, from 1 to 16,\n");
+ 	fprintf(stderr, "   <bank> is MIDI bank to use, from 0 to 16383,\n");
+ 	fprintf(stderr, "   <program> is MIDI program to use, from 0 to 127,\n");
+-	fprintf(stderr, "   and <layout> is either QWERTY, QWERTZ or AZERTY.\n");
++	fprintf(stderr, "   and <layout> is  QWERTY, QWERTZ, AZERTY or DVORAK.\n");
+ 	fprintf(stderr, "See manual page for details.\n");
+ 
+ 	exit(EX_USAGE);
+@@ -1834,7 +1834,7 @@ main(int argc, char *argv[])
+ 		int ret = piano_keyboard_set_keyboard_layout(keyboard, keyboard_layout);
+ 
+ 		if (ret) {
+-			g_critical("Invalid layout, proper choices are QWERTY, QWERTZ and AZERTY.");
++			g_critical("Invalid layout, proper choices are QWERTY, QWERTZ, AZERTY and DVORAK.");
+ 			exit(EX_USAGE);
+ 		}
+ 	}
+--- jack-keyboard.orig/src/pianokeyboard.c
++++ jack-keyboard/src/pianokeyboard.c
+@@ -320,6 +320,56 @@ bind_keys_azerty(PianoKeyboard *pk)
+ 	bind_key(pk, "p", 40);
+ }
+ 
++static void
++bind_keys_dvorak(PianoKeyboard *pk)
++{
++	clear_notes(pk);
++
++	/* Lower keyboard row - ";qjkxbm". */
++	bind_key(pk, "semicolon", 12); /* C0 */
++	bind_key(pk, "o", 13);
++	bind_key(pk, "q", 14);
++	bind_key(pk, "e", 15);
++	bind_key(pk, "j", 16);
++	bind_key(pk, "k", 17);
++	bind_key(pk, "i", 18);
++	bind_key(pk, "x", 19);
++	bind_key(pk, "d", 20);
++	bind_key(pk, "b", 21);
++	bind_key(pk, "h", 22);
++	bind_key(pk, "m", 23);
++	bind_key(pk, "w", 24); /* overlaps with upper row */
++	bind_key(pk, "n", 25);
++	bind_key(pk, "v", 26);
++	bind_key(pk, "s", 27);
++	bind_key(pk, "z", 28);
++
++	/* Upper keyboard row, first octave - "',.pyfg". */
++	bind_key(pk, "apostrophe", 24);
++	bind_key(pk, "2", 25);
++	bind_key(pk, "comma", 26);
++	bind_key(pk, "3", 27);
++	bind_key(pk, "period", 28);
++	bind_key(pk, "p", 29);
++	bind_key(pk, "5", 30);
++	bind_key(pk, "y", 31);
++	bind_key(pk, "6", 32);
++	bind_key(pk, "f", 33);
++	bind_key(pk, "7", 34);
++	bind_key(pk, "g", 35);
++
++	/* Upper keyboard row, the rest - "crl". */
++	bind_key(pk, "c", 36);
++	bind_key(pk, "9", 37);
++	bind_key(pk, "r", 38);
++	bind_key(pk, "0", 39);
++	bind_key(pk, "l", 40);
++	bind_key(pk, "slash", 41); /* extra F */
++	bind_key(pk, "bracketright", 42);
++	bind_key(pk, "equal", 43);
++
++}
++
+ static gint 
+ keyboard_event_handler(GtkWidget *mk, GdkEventKey *event, gpointer notused)
+ {
+@@ -676,6 +726,9 @@ piano_keyboard_set_keyboard_layout(Piano
+ 	} else if (!strcasecmp(layout, "AZERTY")) {
+ 		bind_keys_azerty(pk);
+ 
++	} else if (!strcasecmp(layout, "DVORAK")) {
++		bind_keys_dvorak(pk);
++
+ 	} else {
+ 		/* Unknown layout name. */
+ 		return TRUE;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..288fe0e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-dvorak_layout.patch

-- 
jack-keyboard packaging



More information about the pkg-multimedia-commits mailing list