File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -252,8 +252,14 @@ function addLinkHandler (terminal) {
252
252
}
253
253
254
254
function handleKeybinding ( e , term , binds = whitelistedKeybindingsTerminal ) {
255
- if ( binds . indexOf ( atom . keymaps . keystrokeForKeyboardEvent ( e ) ) > - 1 ) {
256
- // allow users to let key events to fall through to Atom's handler
255
+ if ( e . keyCode === 13 && ( e . altKey || e . metaKey ) && e . type === 'keydown' ) {
256
+ // Meta-Enter doesn't work properly with xterm.js atm, so we send the right escape sequence ourselves:
257
+ if ( term . ty ) {
258
+ term . ty . write ( '\x1b\x0d' )
259
+ }
260
+ return false
261
+ } else if ( binds . indexOf ( atom . keymaps . keystrokeForKeyboardEvent ( e ) ) > - 1 ) {
262
+ // let certain user defined key events fall through to Atom's handler
257
263
return false
258
264
}
259
265
return e
You can’t perform that action at this time.
0 commit comments