[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#527943: Tab and capslock keys make some or all keys stop working



Package: vkeybd
Version: 1:0.1.17b-2
Severity: important
Tags: patch

*** Please type your report below this line ***

While using the computer keyboard to play notes, pressing capslock makes all letter keys stop working because only lowercase keys are defined in keymaps. Moreover, if you have opened a panel (menu view -> key/velocity, controls, etc.), pressing tab will move the focus to the panel so that all keys stop working until the focus comes back to the piano keyboard.

For the first problem I propose that the procedure “KeybdCreate” also declares uppercase keys whenever a key has different lowercase and uppercase values. For the second one, I propose to bind keyboard events to piano notes for the whole application “.” instead of “$w”. This is still located in the same procedure. The patch is as follow:

--- /usr/share/vkeybd/vkeybd.tcl.orig    2009-05-08 22:09:03.000000000 +0200
+++ Desktop/vkeybd.tcl    2009-05-09 12:05:54.000000000 +0200
@@ -94,8 +94,13 @@
     foreach i $keymap {
     set key [lindex $i 0]
     set note [lindex $i 1]
-    bind $w <KeyPress-$key> [list KeyQueue 1 $note 0]
-    bind $w <KeyRelease-$key> [list KeyQueue 0 $note 0]
+    bind . <KeyPress-$key> [list KeyQueue 1 $note 0]
+    bind . <KeyRelease-$key> [list KeyQueue 0 $note 0]
+    set upperkey [string toupper $key]
+    if {[string length $key] == 1 && $upperkey != $key} {
+        bind . <KeyPress-$upperkey> [list KeyQueue 1 $note 0]
+        bind . <KeyRelease-$upperkey> [list KeyQueue 0 $note 0]
+    }
     }
 
Best regards,

JM. Philippe

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages vkeybd depends on:
ii  libasound2                    1.0.16-2   ALSA library
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libx11-6                      2:1.1.5-2  X11 client-side library
ii  tcl8.4                        8.4.19-2   Tcl (the Tool Command Language) v8
ii  tk8.4                         8.4.19-2   Tk toolkit for Tcl and X11, v8.4 -

vkeybd recommends no packages.

vkeybd suggests no packages.

-- no debconf information


Reply to: