diff -rupN jack-keyboard-2.5.old/man/jack-keyboard.1 jack-keyboard-2.5/man/jack-keyboard.1 --- jack-keyboard-2.5.old/man/jack-keyboard.1 2008-05-12 13:32:03.000000000 -0400 +++ jack-keyboard-2.5/man/jack-keyboard.1 2009-12-09 03:43:44.000000000 -0500 @@ -78,7 +78,7 @@ change once, when it connects. .TP \fB-l \fIlayout\fB\fR Specify the layout of computer keyboard being used. Valid arguments are QWERTY, -QWERTZ and AZERTY. Default is QWERTY. +QWERTZ, AZERTY and DVORAK. Default is QWERTY. .SH "DESCRIPTION" .PP \fBjack-keyboard\fR is a virtual MIDI keyboard - a program that allows diff -rupN jack-keyboard-2.5.old/src/jack-keyboard.c jack-keyboard-2.5/src/jack-keyboard.c --- jack-keyboard-2.5.old/src/jack-keyboard.c 2008-05-12 17:17:54.000000000 -0400 +++ jack-keyboard-2.5/src/jack-keyboard.c 2009-12-09 03:44:06.000000000 -0500 @@ -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 either 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); } } diff -rupN jack-keyboard-2.5.old/src/pianokeyboard.c jack-keyboard-2.5/src/pianokeyboard.c --- jack-keyboard-2.5.old/src/pianokeyboard.c 2008-05-12 17:17:59.000000000 -0400 +++ jack-keyboard-2.5/src/pianokeyboard.c 2009-12-09 04:08:13.000000000 -0500 @@ -280,6 +280,54 @@ bind_keys_qwertz(PianoKeyboard *pk) } 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); + 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); + bind_key(pk, "bracketright", 42); +} + +static void bind_keys_azerty(PianoKeyboard *pk) { clear_notes(pk); @@ -676,6 +724,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;