Skip to content

keys

The community/core/keys directory provides a set of configuration files for mapping spoken words to keyboard keys in the Talon voice control system. It includes definitions for letters, numbers, symbols, function keys, special keys, modifier keys, and keypad keys, organized in .talon-list files and used in keys.talon and keys.py.

The mac subdirectory contains macOS-specific configurations. It includes: * special_key.talon-list, which maps names such as "end", "home", and "minus" to their respective key equivalents on macOS. * modifier_key.talon-list, which defines mappings for modifier keys like "control" (to "ctrl"), "super" and "command" (to "cmd"), and "option" (to "alt").

The win subdirectory contains Windows and Linux configurations, which are largely similar. It includes: * special_key.talon-list, which maps names such as "end", "wipe", and "delete" to their corresponding keys on Windows and Linux. * modifier_key.talon-list, which defines mappings for modifier keys like "alt", "control", "shift", and "super" and aliases from other operating systems.

The directory contains several key definition files that are not specific to any operating system:

  • arrow_key.talon-list defines the basic arrow keys, mapping words like "down", "left", "right", and "up" to their corresponding key values.
  • number_key.talon-list defines number keys, mapping words like "zero", "one", "two", etc., to their number key equivalents.
  • function_key.talon-list defines function keys (F1-F20), mapping phrases like "f one", "f two" etc. to their function key equivalents.
  • letter.talon-list defines a phonetic alphabet, mapping words like "air", "bat", and "cap" to their letter key equivalents. This improves the recognition accuracy when speaking letters.
  • keypad_key.talon-list defines the keys on a numerical keypad, mapping phrases like "key pad zero", "key pad one", etc. to their keypad equivalents.

These lists are used by the core files in this directory:

  • keys.talon contains Talon code that defines grammar rules for using the keys defined in the .talon-list files. It enables the spoken triggering of keys, letter combinations, and modified key combinations, and includes support for capitalization.
  • keys.py defines the lists used in the other files, and also the modifiers, key, and keys capture rules that the keys.talon file uses. It also defines a mapping for symbol and punctuation keys, which are available for use both in dictation and command mode.

In summary, the files in this directory provide a comprehensive set of tools for defining and using keyboard keys in Talon, allowing users to control their computer with spoken commands. The directory provides both platform-specific and platform-agnostic key mappings, and it includes definitions for letters, numbers, symbols, function keys, special keys, modifier keys, and keypad keys. These files are used by keys.talon to create rules for spoken key combinations, and keys.py to define the lists and capture rules.