dictation-toolbox / dragonfly

Speech recognition framework allowing powerful Python-based scripting and extension of Dragon NaturallySpeaking (DNS), Windows Speech Recognition (WSR), Kaldi and CMU Pocket Sphinx
GNU Lesser General Public License v3.0
388 stars 75 forks source link

Improve Windows keyboard action support for letter and number keys #336

Closed drmfinlay closed 3 years ago

drmfinlay commented 3 years ago

This changes the Windows keyboard code to fallback on predefined virtual-key codes (see this page) for keys in ranges 0-9, a-z and A-Z if the key cannot be typed using the current keyboard layout. This means that the equivalent key will be typed instead, allowing common keyboard shortcuts, such as Ctrl+C, to work properly.

If the Windows Unicode keyboard is enabled and keys in these ranges cannot be typed on the current keyboard layout, then Dragonfly will fallback on Unicode events. In such a scenario, pressing Ctrl+C using something like Key("c-c") would result in "c" being pressed without the Ctrl modifier key held down. This problem is documented in detail in the documentation on actions.

TODO

drmfinlay commented 3 years ago

I don't think this is related to the mysterious bug described in #182, but I'll link to the issue anyway.