aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/._M.luadoc10
-rw-r--r--core/keys.lua13
2 files changed, 13 insertions, 10 deletions
diff --git a/core/._M.luadoc b/core/._M.luadoc
index 97aa3aa9..22006703 100644
--- a/core/._M.luadoc
+++ b/core/._M.luadoc
@@ -122,6 +122,16 @@
-- ['s\n'] = M.try_to_autocomplete_end | end
-- } | }
--
+-- When defining key bindings for other commands, you may make use of a `Ctrl+L`
+-- (`⌘L` on Mac OSX | `M-L` in curses) keychain. Traditionally this prefix has
+-- been reserved for use by language modules (although neither Textadept nor its
+-- modules utilize it at the moment). Users may define this keychain for new or
+-- existing modules and it will not conflict with any default key bindings.
+--
+-- keys.lua[not OSX and not CURSES and 'cl' or 'ml'] = {
+-- ...
+-- }
+--
-- #### Context Menu
--
-- It may be useful to add language-specific menu options to the right-click
diff --git a/core/keys.lua b/core/keys.lua
index 7e78f865..5dfa50ae 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -91,11 +91,9 @@ local M = {}
-- ## Key Chains
--
-- Key chains are a powerful concept. They allow you to assign multiple key
--- bindings to one key sequence. Language modules
--- [use key chains](#keys.LANGUAGE_MODULE_PREFIX) for their functions. By
--- default, the `Esc` (`⎋` on Mac OSX | `Esc` in curses) key cancels a key
--- chain, but you can redefine it via [`keys.CLEAR`](). An example key chain
--- looks like:
+-- bindings to one key sequence. By default, the `Esc` (`⎋` on Mac OSX | `Esc`
+-- in curses) key cancels a key chain, but you can redefine it via
+-- [`keys.CLEAR`](). An example key chain looks like:
--
-- keys['aa'] = {
-- a = function1,
@@ -106,10 +104,6 @@ local M = {}
-- The key that clears the current key chain.
-- It cannot be part of a key chain.
-- The default value is `'esc'` for the `Esc` key.
--- @field LANGUAGE_MODULE_PREFIX (string)
--- The prefix key of the key chain reserved for language modules.
--- The default value is `'cl'` on platforms other than Mac OSX, `'ml'`
--- otherwise. Equivalent to `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses).
-- @field MODE (string)
-- The current key mode.
-- When non-`nil`, all key bindings defined outside of `keys[MODE]` are
@@ -119,7 +113,6 @@ module('keys')]]
local CTRL, ALT, META, SHIFT = 'c', not CURSES and 'a' or 'm', 'm', 's'
M.CLEAR = 'esc'
-M.LANGUAGE_MODULE_PREFIX = (not OSX and not CURSES and CTRL or META)..'l'
---
-- Lookup table for string representations of key codes higher than 255.