Subject: bug#30043: 25.3; C-M-e inserts euro character

From: Tomas Nordin <[email-masked]>
Date: Thu, 18 Jan 2018 12:16:42 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Tomas Nordin <[email-masked]>
>> Cc: [email-masked]
>> Date: Sun, 14 Jan 2018 20:01:14 +0100
>> 
>> > So I guess you somehow have a keyboard which doesn't fit the new
>> > keyboard input code introduced by Emacs 25, and need to use this
>> > fallback variable to avoid the problem.
>> 
>> Does it mean that the new input code has no fault but the keyboard
>> probably has a problem?
>
> I don't think this is a problem, I think this is how your keyboard is
> supposed to work.  But since you don't like it, I mentioned the

For curiosity I wrote a small python script to collect some keyboard
input at home on Gnu/Linux and at work on Windows

------------------------8<-------------------------------------------
import Tkinter as tk
import time

logfmt = '{:10f}\t{:10}\t{:10}\t{:}'

root = tk.Tk()

def key(event):

    print logfmt.format(time.time() - start_time,
                        repr(event.char),
                        repr(event.keysym),
                        repr(event.keycode))

def callback(event):
    # starts listening here
    frame.focus_set()

frame = tk.Frame(root, width=100, height=100)
frame.bind("<Key>", key)
frame.bind("<Button-1>", callback)
frame.pack()

start_time = time.time()
print '{:10}\t{:10}\t{:10}\t{:}'.format('time', 'char', 'keysym', 'keycode')
root.mainloop()
------------------------>8-------------------------------------------

I tried it by pressing e three times and then ctrl+alt+e and then
e three times again.

Gnu/Linux

time      	char      	keysym    	keycode
  3.201521	'e'       	'e'       	26
  3.497571	'e'       	'e'       	26
  3.713505	'e'       	'e'       	26
  4.329478	''        	'Control_L'	37
  4.473506	''        	'Alt_L'   	64
  4.745468	'\x05'    	'e'       	26
  6.001459	'e'       	'e'       	26
  6.249449	'e'       	'e'       	26
  6.481506	'e'       	'e'       	26

Windows

time      	char      	keysym    	keycode
  2.424000	'e'       	'e'       	69
  2.704000	'e'       	'e'       	69
  2.964000	'e'       	'e'       	69
  3.744000	''        	'Control_L'	17
  3.924000	''        	'Alt_L'   	18
  4.344000	u'\u20ac' 	'e'       	69
  5.866000	'e'       	'e'       	69
  6.147000	'e'       	'e'       	69
  6.347000	'e'       	'e'       	69

I don't know if it adds anything to the discussion, but anyway. Much are
different on the platforms, the only thing in common seem to be the
key symbol in this case, and the char sometimes. The same pattern was
repeated on three Windows stations with different keyboards.