Package Control

The official Sublime Text package manager.

KeyBindingReport

A Sublime Text Package that produces a wide variety of reports about the current state of Sublime Text key bindings on the system it is running on

By vwheeler63
Created June 16, 2026, last updated June 26, 2026.

JunMayAprMarFebJan Dec2025 NovOctSepAugJul 2026-W28 | installs: 4 | removals: 1 | upgrades: 0 2026-W28 | installs: 4 | removals: 1 | upgrades: 0 2026-W28 | installs: 4 | removals: 1 | upgrades: 0 2026-W27 | installs: 3 | removals: 1 | upgrades: 2 2026-W27 | installs: 3 | removals: 1 | upgrades: 2 2026-W27 | installs: 3 | removals: 1 | upgrades: 2 2026-W26 | installs: 10 | removals: 5 | upgrades: 7 2026-W26 | installs: 10 | removals: 5 | upgrades: 7 2026-W26 | installs: 10 | removals: 5 | upgrades: 7 2026-W25 | installs: 0 | removals: 0 | upgrades: 0 2026-W25 | installs: 0 | removals: 0 | upgrades: 0 2026-W25 | installs: 0 | removals: 0 | upgrades: 0 048 WeeklyInstalls 048 WeeklyUpgrades 2026-W26 | upgrades: 7 1.2.1 / 1.2.0 / ... 1.2.1 / 1.2.0 / 1.1.3 / 1.1.2 / 1.1.1 / 1.1.0 2026-W25 | upgrades: 0 1.0.0
Installations: recent average 4 per week, 17 in total
Installations minus removals
Upgrades

Links

Versions

1.2.1 (>ST4000) ·
2026-06-26 17:51

More

License Requires Sublime Text Build 4000 or later Download KeyBindingReport from Package Control Latest Tag GitHub Repository

KeyBindingReport

KeyBindingReport is a Sublime Text Package that produces a wide variety of reports about the current state of Sublime Text key bindings on the system it is running on. This Package is highly useful to any Sublime Text user who deals with key bindings, especially for Package authors.

What You Can Do, and the Reports that Support It

Overview

All reports that come with this Package are accessible through the Command Palette and begin with "KeyBindingReport: ...". The menu option

  Tools > KeyBindingReport > All KeyBindingReport Commands

takes you to the Command Palette with that prefix already entered, filtering the list to just those Commands.

Also, most pre-built reports are available via menu:

  Tools > KeyBindingReport > <format> > <pkg filter> > ...

  or

  Tools > KeyBindingReport > Other Reports > ...

Reports Available

Currently there are 59 pre-built reports that this package can generate, plus an unlimited number of reports that can be created using custom calls to the "key_binding_report" Command (or the other commands), which you run from the Command Palette, or:

Simple Reports

KeyBindingReport: The Main Report

This report is implemented via the KeyBindingReportCommand (key_binding_report) Command. While it is the most complex report to call in this Package, it is simultaneously the most powerful. 54 of the built-in reports shipped with this Package call this command with different arguments.

This command reports about current key bindings present in your Sublime Text installation. The report may include:

and may be limited to:

or any combination of the above.

The report may also exclude key bindings that do not match the current editing context.

Also specifiable:

Report Columns

Columns Always Included

Optional Columns Available via flags Argument

Overview of How to Use this Command's Arguments

Have a look at this table to get the "gist" of how you can vary the arguments you pass to the command to generate different report content. (The default for all of these arguments is None so if the report is run without passing any of these, the report will be empty.)

Description packages key_groups key_names keypress_list
By Package: output all key bindings contained in Package (e.g. Default or a 3rd-party Package) ["pkgname"] None None None
By specified keys limited to a Package: output all of key's binding(s) ["pkgname"] None ["a", ...] None
By specified keys: output bindings for those keys in all Packages that contain bindings for those keys None None ["a", ...] None
By specified KeyGroup using bindings from all Packages None [F_KEYS, ...] None None
By specified KeyGroup limited to a Package ["pkgname"] [F_KEYS, ...] None None
By specified keypress_list for all Packages None None None [["ctrl+u"], ["ctrl+f"]]

key_groups Argument

Passing a value for this argument means to include those key groups in the report. Example: [2,3].

Available Key Groups

The value for the key_groups argument is optional, and can be a possibly empty list of integers from the KeyGroup enumeration. Keys from the specified groups will be added to the data gathered. [KeyGroup.ALL] is equivalent to specifying all the other key groups. Pass None or [] when not applicable. Default: None.

NUMBER_KEYS    =  0
LETTER_KEYS    =  1
F_KEYS         =  2
SYMBOL_KEYS    =  3
NAMED_KEYS     =  4
KEYPAD_KEYS    =  5
KEY_SEQUENCES  =  6  # Multiple-keypress sequences, e.g. ["ctrl+k", "ctrl+u"]
ALL            =  7  # Equivalent to specifying all groups, e.g. [0,1,2,3,4,5,6]

key_names Argument

Optional: list of individual key names, e.g. ["space", "tab", "enter", "a", "b"]. Each key in this list will be included in the data gathered, including all possible key-modifier combinations with these keys. Each key only has an impact on data gathered if it is found in data.all_key_names (which is a programmatically assembled list of all key names in data.key_name_groups, shown in the list below). None or [] when not applicable. Default: None.

                                                        Alternate      Specialty
                    Regular Key Names                   Symbol Names   Keyboards
    --------------------------------------------------  -------------  -----------------
    0   a   n   f1   ,   keypad0          up            backquote      close
    1   b   o   f2   .   keypad1          down          equals         copy
    2   c   p   f3   \   keypad2          left          forward_slash  cut
    3   d   q   f4   /   keypad3          right         minus          find
    4   e   r   f5   ;   keypad4          insert        plus           open
    5   f   s   f6   '   keypad5          delete                       paste
    6   g   t   f7   `   keypad6          home                         redo
    7   h   u   f8   -   keypad7          end                          save
    8   i   v   f9   =   keypad8          pageup                       sysreq
    9   j   w   f10  [   keypad9          pagedown                     undo
        k   x   f11  ]   keypad_period    backspace
        l   y   f12      keypad_divide    tab                          browser_back
        m   z   f13      keypad_multiply  enter                        browser_favorites
                f14      keypad_minus     pause                        browser_forward
                f15      keypad_plus      break                        browser_home
                f16      keypad_enter     space                        browser_refresh
                f17      clear            escape                       browser_search
                f18                       context_menu                 browser_stop
                f19
                f20                                                    + (Spanish kbd)
    ^   \___/    ^   ^     ^              \___________________________________________/
    |     |      |   |     |                                |
    |     |      |   |     |                                +-- NAMED_KEYS
    |     |      |   |     +-- KEYPAD_KEYS
    |     |      |   +-- SYMBOL_KEYS
    |     |      +-- F_KEYS
    |     +-- LETTER_KEYS
    +-- NUMBER_KEYS

And the following are also part of the symbol key group:

    "  (  )  {  }                  # <-- These can be found in Default keymap
                                   #     with contexts.

    `  ~  !  @  #  $  %  ^  &      # <-- These are also bind-able (and should
    *  _  +  |  :  "  <  >  ?      #     have contexts if used).

keypress_list Argument

Optional: list of lists of "keypresses". The inner lists have the same format as "keys" entries from JSON key bindings, and typically include modifier keys. Example: [["ctrl+k", "ctrl+u"], ["ctrl+shift+p"]]. Passing this argument means: include specified keypress/keypress sequences in report. None or [] when not applicable. Default: None.

limit_to_packages Argument

Optional: case-sensitive list of package names that the gathered key-binding data should be limited to, e.g. ["Default", "User"]. None or [] means to gather data from all installed packages. Default: None.

limit_to_context Argument

Optional (Boolean): Default: false. Passing True for this argument means: exclude key bindings whose "context" entries do not match the current editing context in the View that was active when the key_binding_report command was run. The active View can be any View, including input and output views that are involved in Panels (e.g. one of the Find Panels, Console Panel, etc.) as well as Overlays (e.g. Command Palette, Input Overlay, etc.).

Note that Package authors can create their own names for context "key" entries, and Sublime Text determines whether that "context" entry applies or not by calling the package's on_query_context() listener. When this report encounters such a situation (custom name in a "context" entry's "key" value), that Package's actual on_query_context() listener is consulted and its answer is used to determine whether the context applies or not, exactly as Sublime Text does.

fmt Argument

Pass an integer for the fmt argument when you want to specify the output format for the report. Example: 0. Default: 1.

Available Output Formats

The output format must be an integer having one of these values:

flags Argument: What to Show in the Report

The following are among bits you can OR together to specify what to include in the report. These bits can be combined in any combination.

Note: the Table Key shows the meaning of abbreviated column names in the table. It looks like this for the Windows platform when the Windows key is included in the report:

Key:
     W = ⊞ Windows
     A = Alt
     C = Ctrl
     S = Shift
  Ctxt = Context

platform_code Argument

Pass a value for this argument when you want the report to be about a platform other than the one that is currently running. Valid values: "windows", "linux", or "osx" (all lower case).

Example

This key binding

  {
    "keys": ["super+f9"],
    "command": "key_binding_report",
    "args": {
      "limit_to_packages": ["Default"],
      "keypress_list": [["\""]],
      "fmt": 1,
      "flags":   13,  //   INCLUDE_UNBOUND_KEYPRESSES
                      // | INCLUDE_UNTRANSLATED_CONTEXTS
                      // | INCLUDE_NATURAL_LANGUAGE_CONTEXTS
    },
  },

generates this report:


***************************************************
KeyBindingReport:  Specified Key-Bindings (Windows)
***************************************************

As of   :  12-Jun-2026 15:33
Platform:  Windows

Note:
    Keypresses with empty Commands are not bound.

Specification:
    keypress_list     = [['"']]
    limit_to_packages = ['Default']
    limit_to_context  = False
    format            = <Format.OUTLINED: 1>
    flags             = 0x000D
      - INCLUDE_UNBOUND_KEYPRESSES       :  0x0001
      - INCLUDE_UNTRANSLATED_CONTEXTS    :  0x0004
      - INCLUDE_NATURAL_LANGUAGE_CONTEXTS:  0x0008



Single-Keypress Table
*********************

Key:
     A = Alt
     C = Ctrl
     S = Shift
  Ctxt = Context

+-------------------------------------------------------------------+
|Key A C S Ctxt Command        Args                                 |
| "        (1)  insert_snippet {"contents": "\"$0\""}               |
| "        (2)  insert_snippet {"contents": "\"${0:$SELECTION}\""}  |
| "        (3)  move           {"by": "characters", "forward": true}|
| "      x                                                          |
| "    x                                                            |
| "    x x                                                          |
| "  x                                                              |
| "  x   x                                                          |
| "  x x                                                            |
| "  x x x                                                          |
+-------------------------------------------------------------------+
(1):
    "context": [
      { "key": "setting.auto_match_enabled" }
        // Is the View-setting [auto_match_enabled] == true?,
      { "key": "selection_empty"           , "match_all": true }
        // Is selection empty (for all selections)?,
      { "key": "following_text"            , "operator": "regex_contains"    , "operand": "^(?:\t| |\\)|]|\\}|>|$)", "match_all": true }
        // Does regex "^(?:\t| |\\)|]|\\}|>|$)" match any of the text between left edge of selection and EOL (for all selections)?,
      { "key": "preceding_text"            , "operator": "not_regex_contains", "operand": "[\"a-zA-Z0-9_]$", "match_all": true }
        // Does regex "[\"a-zA-Z0-9_]$" match none of the text between BOL and the left edge of selection (for all selections)?,
      { "key": "eol_selector"              , "operator": "not_equal"         , "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
        // Does selector [string.quoted.double - punctuation.definition.string.end] NOT match scope at EOL (for all selections)?
    ]

(2):
    "context": [
      { "key": "setting.auto_match_enabled" }
        // Is the View-setting [auto_match_enabled] == true?,
      { "key": "selection_empty"           , "operand": false, "match_all": true }
        // Is selection NOT empty (for all selections)?
    ]

(3):
    "context": [
      { "key": "setting.auto_match_enabled" }
        // Is the View-setting [auto_match_enabled] == true?,
      { "key": "selection_empty"           , "match_all": true }
        // Is selection empty (for all selections)?,
      { "key": "following_text"            , "operator": "regex_contains", "operand": "^\"", "match_all": true }
        // Does regex "^\"" match any of the text between left edge of selection and EOL (for all selections)?,
      { "key": "selector"                  , "operator": "not_equal"     , "operand": "punctuation.definition.string.begin", "match_all": true }
        // Does selector [punctuation.definition.string.begin] NOT match scope at selection (for all selections)?,
      { "key": "eol_selector"              , "operator": "not_equal"     , "operand": "string.quoted.double - punctuation.definition.string.end", "match_all": true }
        // Does selector [string.quoted.double - punctuation.definition.string.end] NOT match scope at EOL (for all selections)?
    ]

Details about Context Test Implementation

KeyBindingReport's Context testing is as complete an implementation as could be implemented given the logic and API calls currently available from within a Plugin. Specifically, here is is the list of implemented context tests ("key"-entry names):

Fully Implemented

Partially Implemented

The following context tests ("key"-entry names) were only partially implemented because all the logic required to test the condition was not available from a Plugin or via the Sublime Text API: part of the logic that determines this condition is only available internally within Sublime Text itself.

Not Implemented

The following context tests ("key"-entry names) were not implemented because the logic needed to do so is currently only available internally within Sublime Text, not from within a Plugin or via the Sublime Text API.

See Also

See also: class KeyBindingReportCommand in KeyBindingReport/src/commands/report.py.

Results

Packages