-
Notifications
You must be signed in to change notification settings - Fork 1
/
alacritty.yml
771 lines (713 loc) · 38.2 KB
/
alacritty.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
# Note that some xterm terminfo databases don't declare support for italics.
# You can verify this by checking for the presence of `smso` and `sitm` in
# `infocmp xterm-256color`.
TERM: alacritty
# This is necessary to prevent weird window resizing when moving windows
# between screens on my laptop, since there's very different DPIS.
# See https://github.com/alacritty/alacritty/issues/1501
WINIT_X11_SCALE_FACTOR: "1.0"
# Window dimensions in character columns and lines
# (changes require restart)
window:
dimensions:
columns: 140
lines: 60
# Adds this many blank pixels of padding around the window
# Units are physical pixels; this is not DPI aware.
# (change requires restart)
padding:
x: 2
y: 2
# Display tabs using this many cells (changes require restart)
# tabspaces: 8
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true
# Font configuration (changes require restart)
#
# Important font attributes like antialiasing, subpixel aa, and hinting can be
# controlled through fontconfig. Specifically, the following attributes should
# have an effect:
#
# * hintstyle
# * antialias
# * lcdfilter
# * rgba
#
# For instance, if you wish to disable subpixel antialiasing, you might set the
# rgba property to "none". If you wish to completely disable antialiasing, you
# can set antialias to false.
#
# Please see these resources for more information on how to use fontconfig
#
# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration
# * file:///usr/share/doc/fontconfig/fontconfig-user.html
font:
normal:
family: Victor Mono
style: Regular
bold:
family: Victor Mono
style: Bold
italic:
family: Victor Mono
style: Italic
bold_italic:
family: Victor Mono
style: Bold Italic
# normal:
# family: FiraCode Nerd Font
# style: Regular
# bold:
# family: FiraCode Nerd Font
# style: Bold
# italic:
# family: Fira Mono
# style: Italic
# bold_italic:
# family: Fira Mono
# style: Bold Italic
#normal:
# family: Monofur Nerd Font
# style: Book
#bold:
# family: Monofurbold Nerd Font
# style: Bold
#italic:
# family: Monofuritalic Nerd Font
# style: Italic
size: 11.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
# Note: on the mac, we commented both this and glyph_offset out.
offset:
# Make the font "condensed".
x: -1
y: -1
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increase the x offset to move the glyph to
# the right, increase the y offset to move the glyph upward.
glyph_offset:
# Move everything over by one to eliminate artifact before powerline >.
# This has the unfortunate side effect that the > doesn't blend quite
# as well into the previous space, but it's slightly nicer than having
# a half-pixel line between them.
x: -1
y: 0
# OS X only: use thin stroke font rendering. Thin strokes are suitable
# for retina displays, but for non-retina you probably want this set to
# false.
#use_thin_strokes: true
antialias: true
#rgba: none
# Should display the render timer
#render_timer: false
# Colors (Tomorrow Night Bright)
colors:
# Default colors
primary:
background: '0x000000'
foreground: '0xffffff'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x000000'
cursor: '0xffffff'
# Normal colors
normal:
black: '0x000000'
red: '0xdd3c3c'
green: '0x3cdd3c'
yellow: '0xdd9944'
blue: '0x7777ff'
magenta: '0xdd44dd'
cyan: '0x44dddd'
white: '0xcccccc'
# Bright colors
bright:
black: '0x555555'
red: '0xff5555'
green: '0x55ff44'
yellow: '0xffff44'
blue: '0x7777ff'
magenta: '0xff55ff'
cyan: '0x55ffff'
white: '0xffffff'
# Dim colors (Optional)
dim:
black: '0x333333'
red: '0xf2777a'
green: '0x99cc99'
yellow: '0xffcc66'
blue: '0x6699cc'
magenta: '0xcc99cc'
cyan: '0x66cccc'
white: '0xaaaaaa'
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Possible values for `animation`
# `Ease`
# `EaseOut`
# `EaseOutSine`
# `EaseOutQuad`
# `EaseOutCubic`
# `EaseOutQuart`
# `EaseOutQuint`
# `EaseOutExpo`
# `EaseOutCirc`
# `Linear`
#
# To completely disable the visual bell, set its duration to 0.
#
visual_bell:
animation: EaseOutExpo
duration: 0
# Background opacity
#background_opacity: 1.0
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# Live config reload (changes require restart)
live_config_reload: true
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
shell:
program: /bin/zsh
# args:
# - --login
# Key bindings
#
# Each binding is defined as an object with some properties. Most of the
# properties are optional. All of the alphabetical keys should have a letter for
# the `key` value such as `V`. Function keys are probably what you would expect
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
# etc. These all match the glutin::VirtualKeyCode variants.
# http://tomaka.github.io/glium_text/glium/glutin/enum.VirtualKeyCode.html
#
# Possible values for `mods`
# `Command`, `Super` refer to the super/command/windows key
# `Control` for the control key
# `Shift` for the Shift key
# `Alt` and `Option` refer to alt/option
#
# mods may be combined with a `|`. For example, requiring control and shift
# looks like:
#
# mods: Control|Shift
#
# The parser is currently quite sensitive to whitespace and capitalization -
# capitalization must match exactly, and piped items must not have whitespace
# around them.
#
# Either an `action`, `chars`, or `command` field must be present.
# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
# `chars` writes the specified string every time that binding is activated.
# These should generally be escape sequences, but they can be configured to
# send arbitrary strings of bytes.
# `command` must be a map containing a `program` string, and `args` array of
# strings. For example:
# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
#
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
# then run `showkey -a` to get the sequence associated to a key combination.
# Note: AppCursor and AppKeypad mode seem to refer to the following:
# http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-21.html
# It's not clear to me why I care to send different keys for these modes.
# One place it makes a difference is that shift works differently in AppKeypad
# mode when numlock is off: it does not send numbers, but instead weird
# shifted keycodes (home's ^[OH becomes ^[O2w, for instance), FWIW.
# Other possibly interesting references:
# http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-21.html (special keys)
# https://ttssh2.osdn.jp/manual/en/usage/tips/appkeypad.html
## REMAP KEYS
##
## The basic strategy here is to use an F-key prefix. Note that rxvt
## sends << ESC [ %02d ~ >> for F keys, where the placeholder increases
## with the F-number (F1-F5 send 11-15, F6-F10 send 17-21, F11-F12 send
## 23-24). Interestingly, shifted F-keys continue the sequence, more
## or less, with (shift+F1-F4 sending 23-26, shift+F5-F6 sending 28-29,
## shift+F7-F10 sending 31-34, and shift+F11-F12 breaking the pattern
## entirely by using 33 and 34 again, but with a $ at the end instead of
## a ~). Ctrl sends ^ at the end instead of ~ (except for C-Shift-F11/12
## which send @ instead of $).
##
## We therefore pick 36 as our special prefix, sending << ESC [ 3 6 ~ >>,
## which we will call @36 below.
##
## At one point we played with using << ESC [ 3 7 ~ >> as a prefix for
## mod4 (super), but as far as I can tell we do not actually use it (and
## it clobbers AwesomeWM keybindings anyway).
##
## List of all keys (note: xev shows keysym)
## * letters
## * numbers (exclam, at, numbersign, dollar, percent, ampersand, asterisk,
## paren{left,right})
## * 11 unshifted symbols
## - grave (asciitilde), minus (underscore), equal (plus)
## - bracket{left,right} (brace{left,right}), backslash (bar)
## - semicolon (colon), apostrophe (quotedbl)
## - comma (less), period (greater), slash (question)
## * escape, F-keys
## * navigation (ins/del, hom/end, pup/pdn, arrows)
## * backspace, tab, enter, space
##
## Survey of various modifier combinations that need addressing:
## (none) -
## * Letters, numbers, unshifted symbols all send themselves
## * Arrow keys send << ESC [ %c >>, with A/B/C/D for up/down/right/left.
## * INS, DEL, PUP, PDN, HOM, END: send F-sequence with 2, 3, 5, 6, 7, 8.
## * BACKSPACE: \x7f, TAB: \x09, ENTER: \x0a, SPACE: \x20
## Meta - prefixes the no-modifier case with ESC, even if there was
## one there already (e.g. M-INS sends << ESC ESC [ 2 ~ >>).
## Control -
## * Letters x <- ['A'..'Z'], sends a single byte, ord(x)-0x40,
## regardless of whether shift is pressed. Meta prefixes with ESC.
## * BACKSPACE: \x08.
## -> [1] actually just remap to ESC BACKSPACE
## * SPACE: I believe this becomes NUL (\x00), but hard to verify.
## * INS, HOME, PGUP, DEL, END, PGDN: act like F-keys with numbers
## 2, 7, 5, 3, 8, 6, respectively, and thus send ^ instead of ~.
## (NOTE: these don't seem to get through tmux for some reason)
## * [, \, and ]: also subtracts 0x40, for \x1b (ESC), \x1c (FILE
## SEPARATOR), and \x1d (GROUP SEPARATOR). \x1c can cause problems,
## but emacs handles C-\ correctly, so do not remap this one.
## -> [2] remap with other symbols to << @36 sym >> since more useful
## * TAB, ENTER, and all other digits/symbols simply ignore the modifier.
## -> do not remap Ctrl-Tab for now
## -> [2] remap Ctrl-all others to @36 prefix plus unmodified sequence
## (includes digits, backtick, hyphen, equals, brackets, backslash,
## semicolon, comma, period, slash)
## -> [3] remap Ctrl-Enter to same as Ctrl-Shift-J
## Shift -
## * Printable chars are obvious.
## * TAB: << ESC [ Z >> ("backtab").
## * INS: unknown, the window manager pastes before I see it.
## * HOME, PGUP, DEL, END, PGDN: send $ instead of ~
## * BACKSPACE, SPACE, ENTER: ignores the shift.
## -> do not remap for now
## Control-Shift -
## * INS/HOM/PUP/DEL/END/PDN: @ suffix (instead of ~) -> no problem
## * F-keys - sends ^ (ctrl) suffix with shifted number
## * Letters ignore the shift.
## -> [4] remap to @36 prefix plus the normal control character
## * TILDE, UNDERSCORE, QUESTION - send \x1e, \x1f, \x7f
## -> [5] only remap question mark (since \x7f is backspace), others okay
## * Digits and other symbols ignore the control
## -> [5] remap to @36 prefix plus the normal shifted character
## * BACKSPACE, SPACE: ignores the shift
## -> do not remap for now
## * ENTER: ignores both
## -> do not remap for now
## Control-Meta -
## * Letters - send ESC prefix to Ctrl-letter
## * Numbers, unshifted symbols - ignore control
## -> [6] remap same as Ctrl only [2], but add ESC after @36
## Control-Meta-Shift -
## * Letters - ignores shift (I think?)
## -> [7] remap to << @36 ESC control-char >> (cf. [4])
## * Numbers and symbols - ignores control
## -> [8] remap to << @36 ESC shifted-symbol >> (cf. [5])
## includes braces and pipe this time
## TODO(sdh): Fill out a few more Meta combinations
## TODO(sdh): Consider remapping modifiers w/ KP_* (where * is 0-9, decimal,
## multiply, add, divide, subtract, enter, equal - use @37 ??
## - use some other char after @36 ??
## - teach sdh-kbd to support KP_ prefixes (but use normal name)
## TODO(sdh): Consider being more consistent with modifiers - maybe use a
## bitmask? \e[4x~ where x is 1..7 for diff modifiers?
## TODO(sdh): Consider binding separate keys to keypad0..9 w/ various modifiers?
key_bindings:
#- { key: V, mods: Control|Shift, action: Paste }
#- { key: C, mods: Control|Shift, action: Copy }
#- { key: Q, mods: Command, action: Quit }
#- { key: W, mods: Command, action: Quit }
###- { key: Insert, mods: Shift, action: PasteSelection }
# TODO(sdh): These are useful, but we already have bindings for them
# Consider finding bindings with numpad (Minus, Plus, etc)
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }
## Cursor Keys:
## 1. Arrows and Home/End: ^[[<mods><letter>
## <mods> = "" for unmodified, "1;<mask+1>" for modified
## <letter> = {up: A, down: B, right: C, left: D, home: H, end: F}
## 2. Non-arrows: ^[[<number><mods>~
## <mods> = "" for unmodified, ";<mask+1>" for modified
## <number> = {insert: 2, delete: 3, pgup: 5, pgdn: 6}
## <mask> = sum(1 for shift, 2 for alt, 4 for ctrl)
## (Note: some additional keys not used or present have numbers,
## too, including {find: 1, select: 4, home: 7, end: 8})
- { key: Insert, chars: "\x1b[2~" }
- { key: Insert, mods: Shift, chars: "\x1b[2;2~" }
- { key: Insert, mods: Alt, chars: "\x1b[2;3~" }
- { key: Insert, mods: Shift|Alt, chars: "\x1b[2;4~" }
- { key: Insert, mods: Control, chars: "\x1b[2;5~" }
- { key: Insert, mods: Control|Shift, chars: "\x1b[2;6~" }
- { key: Insert, mods: Control|Alt, chars: "\x1b[2;7~" }
- { key: Insert, mods: Control|Shift|Alt, chars: "\x1b[2;8~" }
- { key: Delete, chars: "\x1b[3~" }
- { key: Delete, mods: Shift, chars: "\x1b[3;2~" }
- { key: Delete, mods: Alt, chars: "\x1b[3;3~" }
- { key: Delete, mods: Shift|Alt, chars: "\x1b[3;4~" }
- { key: Delete, mods: Control, chars: "\x1b[3;5~" }
- { key: Delete, mods: Control|Shift, chars: "\x1b[3;6~" }
- { key: Delete, mods: Control|Alt, chars: "\x1b[3;7~" }
- { key: Delete, mods: Control|Shift|Alt, chars: "\x1b[3;8~" }
- { key: PageUp, chars: "\x1b[5~" }
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~" }
- { key: PageUp, mods: Alt, chars: "\x1b[5;3~" }
- { key: PageUp, mods: Shift|Alt, chars: "\x1b[5;4~" }
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
- { key: PageUp, mods: Control|Shift, chars: "\x1b[5;6~" }
- { key: PageUp, mods: Control|Alt, chars: "\x1b[5;7~" }
- { key: PageUp, mods: Control|Shift|Alt, chars: "\x1b[5;8~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~" }
- { key: PageDown, mods: Alt, chars: "\x1b[6;3~" }
- { key: PageDown, mods: Shift|Alt, chars: "\x1b[6;4~" }
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
- { key: PageDown, mods: Control|Shift, chars: "\x1b[6;6~" }
- { key: PageDown, mods: Control|Alt, chars: "\x1b[6;7~" }
- { key: PageDown, mods: Control|Shift|Alt, chars: "\x1b[6;8~" }
- { key: Up, chars: "\x1b[A" }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, mods: Shift|Alt, chars: "\x1b[1;4A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Control|Shift, chars: "\x1b[1;6A" }
- { key: Up, mods: Control|Alt, chars: "\x1b[1;7A" }
- { key: Up, mods: Control|Shift|Alt, chars: "\x1b[1;8A" }
- { key: Down, chars: "\x1b[B" }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, mods: Shift|Alt, chars: "\x1b[1;4B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Control|Shift, chars: "\x1b[1;6B" }
- { key: Down, mods: Control|Alt, chars: "\x1b[1;7B" }
- { key: Down, mods: Control|Shift|Alt, chars: "\x1b[1;8B" }
- { key: Right, chars: "\x1b[C" }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, mods: Shift|Alt, chars: "\x1b[1;4C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Control|Shift, chars: "\x1b[1;6C" }
- { key: Right, mods: Control|Alt, chars: "\x1b[1;7C" }
- { key: Right, mods: Control|Shift|Alt, chars: "\x1b[1;8C" }
- { key: Left, chars: "\x1b[D" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, mods: Shift|Alt, chars: "\x1b[1;4D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Control|Shift, chars: "\x1b[1;6D" }
- { key: Left, mods: Control|Alt, chars: "\x1b[1;7D" }
- { key: Left, mods: Control|Shift|Alt, chars: "\x1b[1;8D" }
- { key: Home, chars: "\x1b[H" }
- { key: Home, mods: Shift, chars: "\x1b[1;2H" }
- { key: Home, mods: Alt, chars: "\x1b[1;3H" }
- { key: Home, mods: Shift|Alt, chars: "\x1b[1;4H" }
- { key: Home, mods: Control, chars: "\x1b[1;5H" }
- { key: Home, mods: Control|Shift, chars: "\x1b[1;6H" }
- { key: Home, mods: Control|Alt, chars: "\x1b[1;7H" }
- { key: Home, mods: Control|Shift|Alt, chars: "\x1b[1;8H" }
- { key: End, chars: "\x1b[F" }
- { key: End, mods: Shift, chars: "\x1b[1;2F" }
- { key: End, mods: Alt, chars: "\x1b[1;3F" }
- { key: End, mods: Shift|Alt, chars: "\x1b[1;4F" }
- { key: End, mods: Control, chars: "\x1b[1;5F" }
- { key: End, mods: Control|Shift, chars: "\x1b[1;6F" }
- { key: End, mods: Control|Alt, chars: "\x1b[1;7F" }
- { key: End, mods: Control|Shift|Alt, chars: "\x1b[1;8F" }
# Back to the defaults
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
# NOTE(sdh): These are xterm's sequences, rather than urxvt, which is fine
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
- { key: F12, mods: Super, chars: "\x1b[24;3~" }
## [1] Convert C-Backspace to M-Backspace
## - This is a weird one to remap in emacs/zsh, so we just remap it here.
- { key: Back, mods: Control, chars: "\x1b\x7f" }
## [2] Convert C-? (for ? digits or symbols) to << @36 ? >>
- { key: Key0, mods: Control, chars: "\x1b[36~0" }
- { key: Key1, mods: Control, chars: "\x1b[36~1" }
- { key: Key2, mods: Control, chars: "\x1b[36~2" }
- { key: Key3, mods: Control, chars: "\x1b[36~3" }
- { key: Key4, mods: Control, chars: "\x1b[36~4" }
- { key: Key5, mods: Control, chars: "\x1b[36~5" }
- { key: Key6, mods: Control, chars: "\x1b[36~6" }
- { key: Key7, mods: Control, chars: "\x1b[36~7" }
- { key: Key8, mods: Control, chars: "\x1b[36~8" }
- { key: Key9, mods: Control, chars: "\x1b[36~9" }
- { key: Grave, mods: Control, chars: "\x1b[36~`" }
- { key: Minus, mods: Control, chars: "\x1b[36~-" }
- { key: Equals, mods: Control, chars: "\x1b[36~=" }
- { key: LBracket, mods: Control, chars: "\x1b[36~[" }
- { key: RBracket, mods: Control, chars: "\x1b[36~]" }
- { key: Backslash, mods: Control, chars: "\x1b[36~\\" }
- { key: Semicolon, mods: Control, chars: "\x1b[36~;" }
- { key: Apostrophe, mods: Control, chars: "\x1b[36~'" }
- { key: Comma, mods: Control, chars: "\x1b[36~," }
- { key: Period, mods: Control, chars: "\x1b[36~." }
- { key: Slash, mods: Control, chars: "\x1b[36~/" }
## [3] Convert C-Enter to C-Shift-J
## - I do not remember why we did this...
- { key: Return, mods: Control, chars: "\x1b[36~\x0a" }
- { key: Return, mods: Alt , chars: "\x1b\x0a" }
## Also make sure return sends ^J ???
## NOTE: the underlying issue is stty -icrnl
## See https://askubuntu.com/questions/441744/pressing-enter-produces-m-instead-of-a-newline
## - { key: Return, chars: "\x0a" }
## [4] Convert C-Shift-Letter to << @36 control-code >>
- { key: A, mods: Control|Shift, chars: "\x1b[36~\x01" }
- { key: B, mods: Control|Shift, chars: "\x1b[36~\x02" }
- { key: C, mods: Control|Shift, chars: "\x1b[36~\x03" }
- { key: D, mods: Control|Shift, chars: "\x1b[36~\x04" }
- { key: E, mods: Control|Shift, chars: "\x1b[36~\x05" }
- { key: F, mods: Control|Shift, chars: "\x1b[36~\x06" }
- { key: G, mods: Control|Shift, chars: "\x1b[36~\x07" }
- { key: H, mods: Control|Shift, chars: "\x1b[36~\x08" }
- { key: I, mods: Control|Shift, chars: "\x1b[36~\x09" }
- { key: J, mods: Control|Shift, chars: "\x1b[36~\x0a" }
- { key: K, mods: Control|Shift, chars: "\x1b[36~\x0b" }
- { key: L, mods: Control|Shift, chars: "\x1b[36~\x0c" }
- { key: M, mods: Control|Shift, chars: "\x1b[36~\x0d" }
- { key: N, mods: Control|Shift, chars: "\x1b[36~\x0e" }
- { key: O, mods: Control|Shift, chars: "\x1b[36~\x0f" }
- { key: P, mods: Control|Shift, chars: "\x1b[36~\x10" }
- { key: Q, mods: Control|Shift, chars: "\x1b[36~\x11" }
- { key: R, mods: Control|Shift, chars: "\x1b[36~\x12" }
- { key: S, mods: Control|Shift, chars: "\x1b[36~\x13" }
- { key: T, mods: Control|Shift, chars: "\x1b[36~\x14" }
- { key: U, mods: Control|Shift, chars: "\x1b[36~\x15" }
- { key: V, mods: Control|Shift, chars: "\x1b[36~\x16" }
- { key: W, mods: Control|Shift, chars: "\x1b[36~\x17" }
- { key: X, mods: Control|Shift, chars: "\x1b[36~\x18" }
- { key: Y, mods: Control|Shift, chars: "\x1b[36~\x19" }
- { key: Z, mods: Control|Shift, chars: "\x1b[36~\x1a" }
## [5] Convert C-Shift-? (for ? digit or symbol) to << @36 shifted-symbol >>
- { key: 11, mods: Control|Shift, chars: "\x1b[36~)" } # key0/rparen
- { key: 2, mods: Control|Shift, chars: "\x1b[36~!" } # key1/bang
- { key: 3, mods: Control|Shift, chars: "\x1b[36~@" } # key2/at
- { key: 4, mods: Control|Shift, chars: "\x1b[36~#" } # key3/hash
- { key: 5, mods: Control|Shift, chars: "\x1b[36~$" } # key4/dollar
- { key: 6, mods: Control|Shift, chars: "\x1b[36~%" } # key5/percent
- { key: 7, mods: Control|Shift, chars: "\x1b[36~^" } # key6/carat
- { key: 8, mods: Control|Shift, chars: "\x1b[36~&" } # key7/and
- { key: 9, mods: Control|Shift, chars: "\x1b[36~*" } # key8/star
- { key: 10, mods: Control|Shift, chars: "\x1b[36~(" } # key9/lparen
# skip tilde and underscore since they have dedicated sequences
# skip curlies and pipe to just send \x1[bdc] since these are sometimes useful??
# NOTE: due to https://github.com/alacritty/alacritty/issues/2125 we need to
# use scancodes instead of names.
- { key: 13, mods: Control|Shift, chars: "\x1b[36~+" } # equals/add
- { key: 39, mods: Control|Shift, chars: "\x1b[36~:" } # semicolon/colon
- { key: 40, mods: Control|Shift, chars: "\x1b[36~\"" } # apostrophe/quote
- { key: 51, mods: Control|Shift, chars: "\x1b[36~<" } # comma/less
- { key: 52, mods: Control|Shift, chars: "\x1b[36~>" } # period/greater
- { key: 53, mods: Control|Shift, chars: "\x1b[36~?" } # slash/question
## [6] Convert C-M-? to insert ESC after the @36 from C-? (cf. [2])
- { key: Key0, mods: Control|Alt, chars: "\x1b[36~\x1b0" }
- { key: Key1, mods: Control|Alt, chars: "\x1b[36~\x1b1" }
- { key: Key2, mods: Control|Alt, chars: "\x1b[36~\x1b2" }
- { key: Key3, mods: Control|Alt, chars: "\x1b[36~\x1b3" }
- { key: Key4, mods: Control|Alt, chars: "\x1b[36~\x1b4" }
- { key: Key5, mods: Control|Alt, chars: "\x1b[36~\x1b5" }
- { key: Key6, mods: Control|Alt, chars: "\x1b[36~\x1b6" }
- { key: Key7, mods: Control|Alt, chars: "\x1b[36~\x1b7" }
- { key: Key8, mods: Control|Alt, chars: "\x1b[36~\x1b8" }
- { key: Key9, mods: Control|Alt, chars: "\x1b[36~\x1b9" }
- { key: Grave, mods: Control|Alt, chars: "\x1b[36~\x1b`" }
- { key: Minus, mods: Control|Alt, chars: "\x1b[36~\x1b-" }
- { key: Equals, mods: Control|Alt, chars: "\x1b[36~\x1b=" }
- { key: LBracket, mods: Control|Alt, chars: "\x1b[36~\x1b[" }
- { key: RBracket, mods: Control|Alt, chars: "\x1b[36~\x1b]" }
- { key: Backslash, mods: Control|Alt, chars: "\x1b[36~\x1b\\" }
- { key: Semicolon, mods: Control|Alt, chars: "\x1b[36~\x1b;" }
- { key: Apostrophe, mods: Control|Alt, chars: "\x1b[36~\x1b'" }
- { key: Comma, mods: Control|Alt, chars: "\x1b[36~\x1b," }
- { key: Period, mods: Control|Alt, chars: "\x1b[36~\x1b." }
- { key: Slash, mods: Control|Alt, chars: "\x1b[36~\x1b/" }
## [7] Convert C-M-Shift-Letter to insert ESC after the @36 from C-Shift-Letter
- { key: A, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x01" }
- { key: B, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x02" }
- { key: C, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x03" }
- { key: D, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x04" }
- { key: E, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x05" }
- { key: F, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x06" }
- { key: G, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x07" }
- { key: H, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x08" }
- { key: I, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x09" }
- { key: J, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0a" }
- { key: K, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0b" }
- { key: L, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0c" }
- { key: M, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0d" }
- { key: N, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0e" }
- { key: O, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x0f" }
- { key: P, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x10" }
- { key: Q, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x11" }
- { key: R, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x12" }
- { key: S, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x13" }
- { key: T, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x14" }
- { key: U, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x15" }
- { key: V, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x16" }
- { key: W, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x17" }
- { key: X, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x18" }
- { key: Y, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x19" }
- { key: Z, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b\x1a" }
## [8] Convert C-M-Shift-? (for ? digit or symbol) to [5] w/ extra ESC
## TODO(sdh): add remaining C-M-S keys?
- { key: 11, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b)" } # key0/rparen
- { key: 2, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b!" } # key1/bang
- { key: 3, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b@" } # key2/at
- { key: 4, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b#" } # key3/hash
- { key: 5, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b$" } # key4/dollar
- { key: 6, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b%" } # key5/percent
- { key: 7, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b^" } # key6/carat
- { key: 8, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b&" } # key7/and
- { key: 9, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b*" } # key8/star
- { key: 10, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b(" } # key9/lparen
- { key: 13, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b+" } # equals/add
- { key: 39, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b:" } # semicolon/colon
- { key: 51, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b<" } # comma/less
- { key: 52, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b>" } # period/greater
- { key: 53, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b?" } # slash/question
- { key: 26, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b{" } # lbracket/lbrace
- { key: 27, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b}" } # rbracket/rbrace
- { key: 43, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b|" } # backslash/pipe
# skip tilde and underscore since they have dedicated sequences
# - { key: Minus, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b_" }
# - { key: Grave, mods: Control|Shift|Alt, chars: "\x1b[36~\x1b~" }
## TODO(sdh): Consider the non-number keys in the numpad. Somewhere I saw
## 'kent' produce \E^M, but I can't find that, so we'll just have it do ^M.
## But these keys are rarely used and could be given special meanings?
- {key: NumpadEnter, chars: "\x0d"}
# TODO(sdh): I can't figure out how to make these produce anything
# when numlock is off...?
#- {key: Numpad5, chars: "\x1b[E" }
## NOTE: The following are bindings for rxvt-unicode's keycodes
## - { key: PageUp, chars: "\x1b[5~" }
## - { key: PageUp, mods: Shift, chars: "\x1b[5$" }
## - { key: PageUp, mods: Control, chars: "\x1b[5^" }
## - { key: PageUp, mods: Control|Shift, chars: "\x1b[5@" }
## - { key: PageUp, mods: Alt, chars: "\x1b\x1b[5~" }
## - { key: PageUp, mods: Shift|Alt, chars: "\x1b\x1b[5$" }
## - { key: PageUp, mods: Control|Alt, chars: "\x1b\x1b[5^" }
## - { key: PageUp, mods: Control|Shift|Alt, chars: "\x1b\x1b[5@" }
## - { key: PageDown, chars: "\x1b[6~" }
## - { key: PageDown, mods: Shift, chars: "\x1b[6$" }
## - { key: PageDown, mods: Control, chars: "\x1b[6^" }
## - { key: PageDown, mods: Control|Shift, chars: "\x1b[6@" }
## - { key: PageDown, mods: Alt, chars: "\x1b\x1b[6~" }
## - { key: PageDown, mods: Shift|Alt, chars: "\x1b\x1b[6$" }
## - { key: PageDown, mods: Control|Alt, chars: "\x1b\x1b[6^" }
## - { key: PageDown, mods: Control|Shift|Alt, chars: "\x1b\x1b[6@" }
## - { key: Insert, chars: "\x1b[2~" }
## - { key: Insert, mods: Shift, chars: "\x1b[2$" }
## - { key: Insert, mods: Control, chars: "\x1b[2^" }
## - { key: Insert, mods: Control|Shift, chars: "\x1b[2@" }
## - { key: Insert, mods: Alt, chars: "\x1b\x1b[2~" }
## - { key: Insert, mods: Shift|Alt, chars: "\x1b\x1b[2$" }
## - { key: Insert, mods: Control|Alt, chars: "\x1b\x1b[2^" }
## - { key: Insert, mods: Control|Shift|Alt, chars: "\x1b\x1b[2@" }
## - { key: Delete, chars: "\x1b[3~" }
## - { key: Delete, mods: Shift, chars: "\x1b[3$" }
## - { key: Delete, mods: Control, chars: "\x1b[3^" }
## - { key: Delete, mods: Control|Shift, chars: "\x1b[3@" }
## - { key: Delete, mods: Alt, chars: "\x1b\x1b[3~" }
## - { key: Delete, mods: Shift|Alt, chars: "\x1b\x1b[3$" }
## - { key: Delete, mods: Control|Alt, chars: "\x1b\x1b[3^" }
## - { key: Delete, mods: Control|Shift|Alt, chars: "\x1b\x1b[3@" }