1

I have laptop Acer Aspire E1-772G and it have Euro key near cursor keys. I do not use Euro and moreover it is implemented so pressing it generate sequence ALT 0 1 2 8

# showkey -k
kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...
keycode  28 release
^[0^[1^[2^[8keycode  56 press
keycode  82 press
keycode  82 release
keycode  79 press
keycode  79 release
keycode  80 press
keycode  80 release
keycode  72 press
keycode  72 release
keycode  56 release

This does a lot of problems, as I press it often by mistake. In mc it terminates it, it searches in history and so on

I would like to remap it to PgUp, to behave as expected from block of cursor keys, but i cannot find, where it is defined, or how to remap it. Can somebody help me?

I am using Gentoo with fluxbox and uxrvt as terminal.

PS: showkey shows the same even without X, but pressing the key just makes a box character (i suppose bad printed euro)

PSS: why it is not duplicate:

  • I have the problem without xbindkeys running

  • I have the problem even without X running

  • my problem is opposite - how to stop a key from sending sequencies of codes, not how to send such sequencies - and the solution (run program to send sequence) does not help to "eat" the sequence, nor I can STOP using mentioned program, as it is not running already and the xmacroplay is not even present on my laptop

4
  • 1
    Possible duplicate of Mapping key combination with xmodmap
    – Jakuje
    Feb 2, 2016 at 20:54
  • 1
    I do not think so, as 1) i do not run xbindkey or anything other which makes macro from single key (and have that problem even without X just in shell) and 2) my problem is reverse - how to make a key from macro - showkey tells me a lot of keys was pressed/relesed, while i touched only one key on my keyboard
    – gilhad
    Feb 2, 2016 at 21:13
  • It is not a duplicate of that question. You can remap sequences of character inputs to strings using XCompose. I'm not sure whether you can specify that Alt is down, though, I don't see an obvious way. It may be worth investigating anyway. Feb 3, 2016 at 1:48
  • Given that ALT0128 is a Microsoft thing (to input characters on Windows using decimal code points in Microsoft character sets), I suspect it's done in hardware/firmware, not the (Linux-based) OS. Mar 18, 2016 at 16:47

1 Answer 1

0

Given that ALT0128 is a Microsoft thing (to input characters on Windows using decimal code points in Microsoft character sets), I suspect it's done in hardware/firmware, not the (Linux-based) OS.

Probably all Linux sees is exactly the same thing it would see if you had pressed: keydown alt key 0 key 1 key 2 key 8 keyup alt.

To confirm that, you could run:

watch -d -n 0.2 cat /proc/interrupts

And compare what happens when you type A with .

You should see some number increasing by two for A, and if it increases by 10 for , then there's probably not much you can do at the OS level.

You could check with Acer if there's a way to reprogram the keyboard, or you could physically disconnect, break or glue or tape that key.

While I don't think there's much you can do at the OS or even X11 level, with GNU screen, you could bind the sequence of characters that the terminal would send upon that series of events to some action, like inserting the sequence of characters normally generated upon PageUP (in ~/.screenrc):

bindkey \0330\0331\0332\0338 stuff "\033[2~"

Then that would at least for terminal applications that you run within screen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .