summaryrefslogtreecommitdiff
path: root/config/bindings.go
AgeCommit message (Collapse)Author
2022-04-25binds: fix incorrect key names for c-] and c-[Ivan Oleynikov
The left and right square brackets are inverted. Fix that. Signed-off-by: Ivan Oleynikov <ivan.oleynikov95@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-04-17binds: allow to bind a command to < and >Koni Marti
Allow to bind to < and > by using \< and \> in binds.conf. Ensure that the single \ can still be properly used to bind to other commands. For example, the following binds would work now: \< = :prev-tab<Enter> \> = :next-tab<Enter> \ = :filter<space> Fixes: https://todo.sr.ht/~rjarry/aerc/37 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Sebastian LaVine <mail@smlavine.com> Acked-by: Robin Jarry <robin@jarry.cc>
2022-02-02review: display actual bindings for commandsRobin Jarry
Parse the actual user bindings to determine what shortcuts are available in the compose::review stage. Add a predefined list of commands for which we want to display the keyboard shortcuts. Fixes: https://todo.sr.ht/~rjarry/aerc/14 Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-01-20bindings: fix ctrl-h binding not workingRobin Jarry
For some unknown reason. tcell does not include the ctrl modifier for the ctrl-h key event. Fixes: 7a6c808c042b ("bindings: prepare for more modifers") Fixes: https://todo.sr.ht/~rjarry/aerc/8 Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-12-11binds: add account specific bindingsJonathan Bartlett
When using aerc for multiple accounts often bindings might differ slightly between accounts. For example: * Account A archives to one directory (:archive) * Account B archives to monthly directories (:archive month) Add account specific bindings to allow the user to add a "context" to a binding group using a context specifier and a regular expression. Currently the only context specifier is 'account'. The regular expression is validated against the accounts loaded from accounts.conf and the configuration fails to load if there are no matches. Contextual bindings are merged with global bindings, with contextual bindings taking precedence, when that context is active. Bindings are be configured using a generic pattern of 'view:context=regexp'. E.g.: # Globally Applicable Archiving [messages] A = :read<Enter>:archive<Enter> # Monthly Archiving for 'Mailbox' Account [messages:account=Mailbox$] A = :read<Enter>:archive month<Enter> In the above example all accounts matching the regular expression will archive in the monthly format - all others will use the global binding. Signed-off-by: Jonathan Bartlett <jonathan@jonnobrow.co.uk>
2021-10-28bindings: support more modified keysRobin Jarry
Add new supported keys: Ctrl+Enter Ctrl+Up Ctrl+Down Ctrl+Left Ctrl+Right Ctrl+PageUp Ctrl+PageDown Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-10-28bindings: prepare for more modifersRobin Jarry
Prepare to support more modifiers in key bindings. tcell has some premade ctrl-modified keys but not all keys are supported. Other keys must be explicitly checked with a modifier mask. Update the KeyStroke type to carry a modifier mask. Update code accordingly. No functional change. Link: https://github.com/gdamore/tcell/blob/master/key.go#L265-L275 Link: https://github.com/gdamore/tcell/blob/master/key.go#L384-L419 Signed-off-by: Robin Jarry <robin@jarry.cc>
2020-12-18update tcell to v2 and enable TrueColor supporty0ast
Also update to the tcell v2 PaletteColor api, which should keep the chosen theme of the user intact. Note, that if $TRUECOLOR is defined and a truecolor given, aerc will now stop clipping the value to one of the theme colors. Generally this is desired behaviour though.
2019-09-04all: use fmt.Errorf for fomartting errorsWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-07-17lowercase all key bindingsReto Brunner
2019-05-24Change ex command to C-x when using terminalDrew DeVault
2019-05-14Add distinct keybindings for each compose viewDrew DeVault
2019-03-21Rig up terminal keybinding groupDrew DeVault
2019-03-21Add context-specific keybindingsDrew DeVault
2019-03-21Add additional context to key binding setDrew DeVault
2019-03-15Fix special key bindings (e.g. <C-d>)Drew DeVault
2019-03-15Rig up key bindingsDrew DeVault
2019-03-15Implement key bindings subsystemDrew DeVault
Which is not yet rigged up