How to bind Ctrl-Enter in fish? -


in order configure user binding (version 2.2.0), must in fish_user_key_bindings function:

function fish_user_key_bindings     bind \n 'commandline -f accept-autosuggestion execute' end 

this works fine.

i wanted expand binding ctrl+enter, using appropriate modifier:

function fish_user_key_bindings     bind \c\n 'commandline -f accept-autosuggestion execute' end 

this not work: enter uses current (up cursor) suggestion (which default) but ctrl+enter well (as if action modifier not taken account)

binding \c\n doesn't make sense because \n control character. applying control modifier second time control character has no effect. since \n alias \cj you're trying equivalent of binding \c\cj. way bind [ctrl][enter] configure terminal send unique sequence key combination.

p.s., if grab current git head source can make fish_key_reader build handy program show lot of information different keys send (although you'll need wait few minutes time type because need merge https://github.com/fish-shell/fish-shell/pull/3012).

p.p.s., of fish 2.3.0 (currently in beta testing) tty driver no longer automatically converts \r (aka \cm) enter key sends \n (aka \cj).


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -