You are not logged in.

#1 2019-10-24 10:48:10

wowsuchcode
Member
Registered: 2019-05-16
Posts: 11

[SOLVED] Linking a keypress to writing in terminal ?

I work with i3 and multiple ZSH terminals opened.

I often need to type the "exit" command to close the shell or the current subprocess. This is annoying.

Is there a way that I can link one of my keys (say, for example, the "end" key) to write "exit" and enter, in my currently focused terminal ?


Alternative solutions I could think of don't work very well for me :

- Using an I3 shortcut to close the window : I dont want to close the window, sometimes I just want to close the current sub-process in the shell and go back one level before, for example if I'm SSHing into a remote server, I want to exit back to my own terminal, not close it

- Using a ZSH alias : this would only work on ZSH and on my machine, I'm looking for a solution that would work for any program.

Last edited by wowsuchcode (2019-10-24 10:54:03)

Offline

#2 2019-10-24 10:50:13

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,711
Website

Re: [SOLVED] Linking a keypress to writing in terminal ?

Use Ctrl+D?

Update: Some technical details about this.

Last edited by schard (2019-10-24 11:36:53)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#3 2019-10-24 10:53:45

wowsuchcode
Member
Registered: 2019-05-16
Posts: 11

Re: [SOLVED] Linking a keypress to writing in terminal ?

schard wrote:

Use Ctrl+D?

Oh my f***** god I can't believe I didn't know this command. Thank you.

Last edited by wowsuchcode (2019-10-24 10:54:25)

Offline

Board footer

Powered by FluxBB