[Ilugc] Key Bindings

  • From: kapil@xxxxxxxxxxx (Kapil Hari Paranjape)
  • Date: Thu Sep 3 10:18:22 2009

Hello,

On Thu, 03 Sep 2009, Girish Venkatachalam wrote:

Set it to

string F1 = "\033[[ls -l\n"

This looks wrong. I think it should be
 string F1 = "ls -l\n"
The additional Esc+[+[ seems to be unneccesary.

Obviously this done not work in xterms. I never got that to work.

The above key sequence settings may cause additional problems with X.
For example, did you use "xev" to check whether pressing "F1" still
gives the "F1" XKSymbol after this wierd definition?

Overall, I have found that messing around with loadkeys is only
useful if you _only_ use the Linux console. Even in that case it is
better to define key sequences in specific applications rather than
replacing the characters that the console stuffs into the buffer.

Most terminal applications (vi,emacs,mc,git,screen ...) and a few
graphical ones (like Emacs-with-X, gvim) allow you to assign commands
or character strings to key sequences.

The later in the food chain that you assign a key sequence, the more
likely it is that the meaning (semantics) can be application specific.

It is true that it would be nice if there was a general way to say
something like the following for all applications at once:
 F1 should be help
 F2 should be prompt for command/function
 F3 should be prompt for external file/URL 
and so on. Moreover, this should be user configurable in one place
for all applications.

Clearly this needs some kind of hotkey callback library that all
applications should link to. Perhaps the Desktop Environments do this
but I wouldn't know since I don't really use them.

Regards,

Kapil.
--

Other related posts: