Skip to content
Myr

Add support for ctrl-space key

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #825

authored by Junegunn Choi · committed by Junegunn Choi · parent 421b9b2 · Browse files · 7 files+11 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+11 added−0 removed

  • other:+11 added−0 removed

7 files+11 added−0 removed

modified:man/man1/fzf.1+1 added
424 unmodified lines
425e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR426427.B AVAILABLE KEYS: (SYNONYMS)428 \fIctrl-[a-z]\fR429 \fIctrl-space\fR430 \fIalt-[a-z]\fR431 \fIalt-[0-9]\fR432 \fIf[1-12]\fR433 \fIenter\fR (\fIreturn\fR \fIctrl-m\fR)
132 unmodified lines
modified:src/tui/light.go+2 added
320 unmodified lines
321 case CtrlQ:322 return Event{CtrlQ, 0, nil}323 case 127:324 return Event{BSpace, 0, nil}325 case 0:326 return Event{CtrlSpace, 0, nil}327 case ESC:328 ev := r.escSequence(&sz)329 // Second chance330 if ev.Type == Invalid {
527 unmodified lines
modified:src/tui/ncurses.go+2 added
473 unmodified lines
474 case ESC:475 return escSequence()476 case 127:477 return Event{BSpace, 0, nil}478 case 0:479 return Event{CtrlSpace, 0, nil}480 }481 // CTRL-A ~ CTRL-Z482 if c >= CtrlA && c <= CtrlZ {483 return Event{int(c), 0, nil}
22 unmodified lines
modified:src/tui/tcell.go+2 added
268 unmodified lines
269 case tcell.KeyCtrlY:270 return Event{CtrlY, 0, nil}271 case tcell.KeyCtrlZ:272 return Event{CtrlZ, 0, nil}273 case tcell.KeyCtrlSpace:274 return Event{CtrlSpace, 0, nil}275 case tcell.KeyBackspace, tcell.KeyBackspace2:276 if alt {277 return Event{AltBS, 0, nil}278 }
288 unmodified lines
modified:src/tui/tui.go+1 added
36 unmodified lines
37 CtrlX38 CtrlY39 CtrlZ40 ESC41 CtrlSpace4243 Invalid44 Resize45 Mouse
372 unmodified lines
modified:src/options.go+2 added
391 unmodified lines
392 case "space":393 chord = tui.AltZ + int(' ')394 case "bspace", "bs":395 chord = tui.BSpace396 case "ctrl-space":397 chord = tui.CtrlSpace398 case "alt-enter", "alt-return":399 chord = tui.AltEnter400 case "alt-space":401 chord = tui.AltSpace
827 unmodified lines
modified:CHANGELOG.md+1 added
10 unmodified lines
11- Added `execute-silent` action for executing a command silently without12 switching to the alternate screen. This is useful when the process is13 short-lived and you're not interested in its output.14 - e.g. `fzf --bind 'ctrl-y:execute!(echo -n {} | pbcopy)'`15- `ctrl-space` is allowed in `--bind`16170.16.218------19- Dropped ncurses dependency
548 unmodified lines