Reputation: 93186
Is there a way to trigger/fire the UP key in the command line?
Instead of me having to press UP key.
Upvotes: 1
Views: 1133
Reputation: 455020
If you have xvkbd installed, you an use its -text
option to send any string to the focused window as:
xvkbd -text "\[Up]"
Upvotes: 1
Reputation: 8474
You can bind Up to different key combination using xmodmap.
The following works for me binding the key to Alt Gr-W (right Alt on some keyboard layouts).
xmodmap -e 'keycode 25 = w W Up Up Up'
Upvotes: 0
Reputation: 360055
This sounds like an XY Problem to me.
If what you really want to do is to be able to access and execute a previous command in the history without pressing up-arrow, there are various ways to do that:
!!
will execute the previous commandstring
will allow you to search for previous commands!string
searches for a command beginning with "string"!?string
searches for a command containing with "string"Upvotes: 1