[code][textadept] New keybinding syntax

From: Robert Gieseke <rob.g.att.web.de>
Date: Mon, 29 Jun 2020 12:40:36 +0200

Hi Mitchell,

i quite like the new keybinding syntax you introduced in a recent commit
[1].

The Modifier+key syntax looks much easier to parse:

  [buffer.new] = {'ctrl+n', 'cmd+n', 'ctrl+meta+n'},

I saw your 'translate' function [2]

local keys = keys
local function translate(key)
  return not CURSES and key or key:gsub('alt%+', 'meta+')
end

and was wondering whether it would be possible to expose the mappings in
`core/keys.lua` [3] as public variables to allow for direct
configuration of these?

Something like

keys.CMD = keys.ALT

Or is there a technical reason why such a replacement couldn't work?

Cheers,
Robert

[1] https://foicica.com/hg/textadept/rev/b665f0c8a2cb
[2] https://foicica.com/hg/.textadept/rev/1b89bdbc5e10#l1.8
[3] https://foicica.com/hg/textadept/rev/b665f0c8a2cb#l2.69

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 29 Jun 2020 - 06:40:36 EDT

This archive was generated by hypermail 2.2.0 : Tue 30 Jun 2020 - 06:34:58 EDT