Skip to content

Configuring key bindings

Trevor Arjeski edited this page Jul 2, 2021 · 7 revisions

Configuration

The default keymap is commented out at the bottom of the default config.yml file that tiny creates.

Here is a minimal version:

key_map:
  ctrl_a:     input_move_curs_start
  ctrl_e:     input_move_curs_end

Each entry in the map is made up of a Key (single or combination) and a KeyAction.

Keys

Here are the available keys that you can set or override:

Single keys

  • backspace
  • del
  • end
  • esc
  • home
  • pgdown
  • pgup
  • tab
  • up
  • down
  • left
  • right
  • any other single character or number

Combinations

  • Alt + arrow, ex. alt_left
  • Alt + character, ex. alt_c
  • Ctrl + character, ex. ctrl_a
  • Ctrl + arrow, ex. ctrl_up

Advanced Mappings

If you are using a non-US keyboard, such as AZERTY, you may rebind the tab control keys as follows:

keymap:
  alt_&: 
     tab_goto: 1
  alt_": 
     tab_goto: 3
  alt_': 
     tab_goto: 4
  alt_(: 
     tab_goto: 5
  alt_-: 
     tab_goto: 6
  alt_è: 
     tab_goto: 7
  alt__: 
     tab_goto: 8
  alt_ç: 
     tab_goto: 9
  alt_à: 
     tab_goto: 0

You can also rebind characters to other characters with the following:

keymap:
  q: 
     input: p

This will map the q key to p, so when you hit q it will input a p in the text field.

Clone this wiki locally