1

In my keyboard I button doesn't work. I had earlier asked a Q on how to make a key simulate another key. That Q solved the issue only after I logged in my system. I'm working on Ubuntu 13.04. But how to solve the same issue that I'm facing before logging in my system? Take the below example:

While logging, in GRUB 2 boot menu, I press "c" & enter command line. Now here how to make a key simulate I? It would solve my issue completely if the change incorporated to achieve this is permanent in effect (whether I login or not; even if I boot into a different software, etc)

1

If this is a PC, you can try the following:

  • Hold down the ALT key
  • Type the ASCII code on the keypad (108 for lowercase 'l')
  • Let go of the ALT key

Make sure not to use the numbers at the top of the keyboard. Also, this may only work with the left ALT key.

1

If your grub CLI mode is similar to this, then it has many standard features, including the echo command and support for variables, so most likely you could simply do:

A="$(echo -en '\0154')"

Then you would use it like this, for instance to do the ls -l command :)

$(echo $A)s -$(echo $A)

ALT+code is so much easier. But this is a last resort solution. Why "simulate" a key in that bash-like environment when you can simply generate the output with echo and the octal value for the character you're looking for?

0

I'd suggest, if you can, just modifying your GDM so that it loads your xmodmaps as well. From this AU Q&A titled: Why won't my ~/.Xmodmap file load on login?.

excerpt

Also you could check /etc/gdm/Xsession for the line usermodmap="$HOME/.Xmodmap" and if it isn't there just append it at the end of the file. If you're the only user of the system just put your changes into /etc/X11/Xmodmap.

  • GDM + grub - is that possible? – ash Jan 5 '14 at 4:45
  • @ash - my solution was only helping from GDM on. I hadn't noticed the GRUB part of his Q. – slm Jan 5 '14 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.