aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/keymap.c
Commit message (Collapse)AuthorAge
* refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535)zeertzjq2022-05-12
| | | | | | | | Most code in keymap.h is for keycode definitions, while most code in keymap.c is for the parsing and conversion of keycodes. The name "keymap" may also make people think these two files are for mappings, while in fact keycodes are used even when no mappings are involved, so "keycodes" should be a better file name than "keymap".
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4858: K_SPECIAL may be escaped twicezeertzjq2022-05-03
| | | | | | Problem: K_SPECIAL may be escaped twice. Solution: Avoid double escaping. (closes vim/vim#10340) https://github.com/vim/vim/commit/db08887f24d20be11d184ce321bc0890613e42bd
* vim-patch:8.2.4829: a key may be simplified to NULzeertzjq2022-04-29
| | | | | | | Problem: A key may be simplified to NUL. Solution: Use K_ZERO instead. Use macros instead of hard coded values. (closes vim/vim#10290) https://github.com/vim/vim/commit/17c95d9608370559441bb73941ba6d9a4b6b26bd
* vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nicezeertzjq2022-04-29
| | | | | | | | | Problem: Using \{xxx} for encoding a modifier is not nice. Solution: Use \<*xxx> instead, since it's the same as \<xxx> but producing a different code. https://github.com/vim/vim/commit/fccd93f0917234b962ce07d1df3adf9d7105936f Use this notation in langmap_spec.
* vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifierzeertzjq2022-04-29
| | | | | | | | Problem: GUI tests fail because the test doesn't use a modifier. Solution: Add "\{xxx}" to be able to encode a modifier. https://github.com/vim/vim/commit/ebe9d34aa07037cff2188a8dd424ee1f59cbb0bf Change macros to enums to use them in unit tests.
* vim-patch:8.1.2145: cannot map <C-H> when modifyOtherKeys is enabledzeertzjq2022-04-29
| | | | | | | | | | | | | Problem: Cannot map <C-H> when modifyOtherKeys is enabled. Solution: Add the <C-H> mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions.
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* feat(keymap): add F38-F63 keys (#17893)zeertzjq2022-04-11
|
* feat(input): enable <tab>/<c-i>, <cr>/<c-m>, <esc>/<c-[> pairs unconditionallybfredl2022-03-24
|
* feat(input)!: delay some conversions to vgetc()zeertzjq2022-03-24
|
* refactor: remove CSI unescaping and clean up related names and commentszeertzjq2022-01-21
|
* refactor: remove the <xCSI> keyzeertzjq2022-01-21
| | | | CSI typed directly is now just <CSI>. The <xCSI> key is obsolete.
* refactor(macros): delete multibyte macros which just are aliasesBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_char2len alias for utf_char2lenBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* vim-patch:8.1.1355: obvious mistakes are accepted as valid expressionsSean Dewar2021-09-11
| | | | | | | | | Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes vim/vim#3981) https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685 Update vim_str2nr_spec.lua to add more tests that use strict = true.
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|
* lintJan Edmund Lazo2021-05-06
|
* vim-patch:8.0.1309: cannot use 'balloonexpr' in a terminalJan Edmund Lazo2021-05-06
| | | | | | | Problem: Cannot use 'balloonexpr' in a terminal. Solution: Add 'balloonevalterm' and add code to handle mouse movements in a terminal. Initial implementation for Unix with GUI. https://github.com/vim/vim/commit/51b0f3701ecb440aa72ab6017c1df6940c0e0f6f
* keymap: Preserve S- modifier when C- is presentJames McCoy2020-11-16
| | | | Closes #12037
* Understand Escape as another name for EscJames McCoy2020-11-16
| | | | | | | | This allows us to remove special-case handling of Esc in forward_modified_utf8(), which was always sending "<Esc>" to nvim even when there were modifiers present. Closes #12584
* lua: add vim.register_keystroke_callback (#12536)TJ DeVries2020-08-14
| | | | | | | | | | | | | | | * feat: Add vim.register_keystroke_callback * fixup: Forgot to remove mention of old option * fixup: Answer jamessan comments * fixup: Answer norcalli comments * fixup: portability * Update runtime/doc/lua.txt Co-authored-by: Ashkan Kiani <ashkan.k.kiani@gmail.com>
* [squash] fix comment [skip ci]erw72020-05-26
|
* vim-patch:8.1.1300: in a terminal 'ballooneval' does not work right awayJan Edmund Lazo2019-12-30
| | | | | | | Problem: In a terminal 'ballooneval' does not work right away. Solution: Flush output after drawing the balloon. Add the <Ignore> key code. Add a test. https://github.com/vim/vim/commit/2f10658b06bbdd8f25c4ff152266c808234cee0a
* vim-patch:8.1.0362: cannot get the script line number when executing a functionerw72019-09-04
| | | | | | | Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes vim/vim#3362) Also display the line number with ":verbose set". https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
* log: log_key()Justin M. Keyes2019-08-27
|
* paste: WIP #4448Justin M. Keyes2019-08-27
|
* keymap: allow modifiers to multibyte chars, like <m-ä>Björn Linse2019-08-16
|
* keymap, terminal: more keycodes #9810Olivier G-R2019-03-31
| | | | | | | | | - input: recognize <kEqual>, <kComma> - terminal.c: If we need to support function key, a change must be made in libvtermkey. Currently, it emulates strictly VT220 terminal, and returning numeric value in 'normal' mode is the expected behaviour. closes #9810
* keymap: add more (keypad) keycodes #9793Olivier G-R2019-03-29
| | | | | | | | | | | | | | | | | - K_KORIGIN instead of K_KCENTER: This name is similar to what is used by xev. Alternative could be K_KBEGIN as hinted here: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys But I find Begin and Home too similar, and it might induced some confusion. The naming looked related to some old keyboard configuration. - keymap.c: alias KPPeriod to kDel instead of kPoint. This might seems weird, but this is actually the behaviour that should be expected. libtermkey produces "KPPeriod" when num lock is off. To fix this would need to change this name in termkey. closes #9780 closes #9793
* lint: clean-up after parent commitsZviRackover2018-09-09
|
* Remove has_mbytes local to lines changed in parent commitZviRackover2018-09-09
|
* Refactor: Remove occurences of mb_char2bytesZviRackover2018-09-09
|
* lint: clean-up after parent commitsZviRackover2018-08-31
|
* Refactor: remove mb_ptr2len_len, mb_ptr2cells and mb_ptr2cells_lenZviRackover2018-08-31
| | | | Remove occurences of these macros.
* getchar: implement <Cmd> key to invoke command in any modeBjörn Linse2018-03-23
|
* vim-patch:8.0.0212: buffer for key name may be too small (#8009)KunMing Xie2018-02-18
| | | | | | | | | Problem: The buffer used to store a key name theoreticaly could be too small. (Coverity) Solution: Count all possible modifier characters. Add a check for the length just in case. https://github.com/vim/vim/commit/423977d3cebac2be1158b1d11da60fe96db4b750
* os/input.c: parse keycodes in non-string context #7411lePerdu2018-01-18
| | | | | | | | | | | cb02137dfac7 had two mistakes, of the same nature: trans_special() must be invoked with in_string=false unless the parsing context is a VimL string. replace_termcodes() and input_enqueue() are low-level mechanisms where VimL strings do not exist. keymap.c: adjust double-quote case to satisfy keymap_spec.lua closes #7410
* keymap: Do not use vim_isIDc in keymap.cZyX2017-11-30
| | | | | | | | Note: there are three changes to ascii_isident. Reverting first two (in find_special_key and first in get_special_key_code) normally fails the new test with empty &isident, but reverting the third does not. Hence adding `>` to &isident. Ref vim/vim#2389.
* *: Fix some typos found by oni-linkZyX2017-11-06
|
* *: Fix linter errorsZyX2017-10-30
| | | | Big function in expressions.c may be refactored, if I ever catch the idea how to split it right.
* keymap: Remove incorrect castZyX2017-10-16
|
* klee: Update key_name_entry tableZyX2017-10-16
|
* keymap: Readd figure braces disappeared when resolving conflictsZyX2017-10-15
|
* Merge branch 'master' into expression-parserZyX2017-10-15
|\
| * lintJustin M. Keyes2017-09-05
| |