[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to tell which key was pressed to execute a script?



Andrej Hocevar <drejcica@volja.net> writes:

> I'd like to be able to call a script with multiple keys in a way
> that it would know how it was called.

So use command-line arguments, or write a separate script for each
key.  They're cheap.  :-)

> The main reason I want to do this is to gain more flexibility and
> make it a little more elegant: changing the keymaps so that F2, for
> example, starts mutt is handy, but less elegant than assigning the
> function "Console_11" to the otherwise unused windows key to get me
> to my own X console.

...but what context is this happening in?  X keymaps and Linux console
keymaps are completely separate; I admit to not being really familiar
with the latter, but under X, this is usually handled by your window
manager, and it's pretty straightforward to cause an arbitrary command
to be run when a particular key is pressed.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: