jsmecham / atom-terminal-tab

Simple terminal for the Atom text editor.
https://atom.io/packages/terminal-tab
MIT License
142 stars 29 forks source link

Enhancement: Prevent swallowing selected Atom hotkeys #56

Open skylize opened 6 years ago

skylize commented 6 years ago

I've got alt-shift-arrow hotkeys set up on atom-workspace for moving between panes, but terminal-tab is swallowing the input when focused.

Would be great if it was possible for these hotkeys, along a few others, like Ctrl-\ for Tree View, to reach the Atom workspace.

max-sixty commented 6 years ago

Are there any temporary workarounds for this?

toumorokoshi commented 6 years ago

I rant into this as well. Looking a little at the code, it seems that the terminal view sets the focus on the underlying xterm instance. It seems like xterm has it's own handlers of keys, and that's swallowing the input.

I was unable to remap the terminal-view hotkeys to anything prefixed with alt.

jsmecham commented 6 years ago

Temporary, no. However, I do have a branch where I'm working on solving all of these keybinding-related issues. Xterm allows you to register your own key event handler, so I'm exploring some options there for this particular issue. It's a bit of a complicated issue as to where the shortcuts should be bound, since sending them all to Atom could break or make unusable programs in the Terminal and vice-versa. Hope to have some progress on this soon.

skylize commented 6 years ago

It's a bit of a complicated issue as to where the shortcuts should be bound, since sending them all to Atom could break or make unusable programs in the Terminal and vice-versa.

I think ideally the user could list which bindings should be directed to the terminal, with all others directed to Atom. You could default the list to include a few obviously important terminal commands, like Ctrl-C.

krystofl commented 4 years ago

It's been quite a while, so I assume this isn't getting resolved, correct @jsmecham?