From 8befa1ebf73cdec359bf637c9393584797581001 Mon Sep 17 00:00:00 2001 From: David Gronlund Date: Wed, 9 Dec 2020 23:21:47 -0700 Subject: [PATCH] Add support for SIGQUIT, SIGSTOP, and tmux special character bindings --- app/commands.ts | 9 +++++++++ lib/index.tsx | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/commands.ts b/app/commands.ts index 4f3b1691..51abffcd 100644 --- a/app/commands.ts +++ b/app/commands.ts @@ -101,6 +101,15 @@ const commands: Record void> = { 'editor:break': (focusedWindow) => { focusedWindow?.rpc.emit('session break req'); }, + 'editor:stop': (focusedWindow) => { + focusedWindow?.rpc.emit('session stop req'); + }, + 'editor:quit': (focusedWindow) => { + focusedWindow?.rpc.emit('session quit req'); + }, + 'editor:tmux': (focusedWindow) => { + focusedWindow?.rpc.emit('session tmux req'); + }, 'editor:search': (focusedWindow) => { focusedWindow?.rpc.emit('session search'); }, diff --git a/lib/index.tsx b/lib/index.tsx index b1f2c3ce..26d6192a 100644 --- a/lib/index.tsx +++ b/lib/index.tsx @@ -135,6 +135,18 @@ rpc.on('session break req', () => { store_.dispatch(sessionActions.sendSessionData(null, '\x03')); }); +rpc.on('session stop req', () => { + store_.dispatch(sessionActions.sendSessionData(null, '\x1a')); +}); + +rpc.on('session quit req', () => { + store_.dispatch(sessionActions.sendSessionData(null, '\x1c')); +}); + +rpc.on('session tmux req', () => { + store_.dispatch(sessionActions.sendSessionData(null, '\x02')); +}); + rpc.on('session search', () => { store_.dispatch(sessionActions.onSearch()); });