[issue1482122] Shift+Backspace exhibits odd behavior

Guilherme Polo report at bugs.python.org
Fri Jan 2 20:51:25 CET 2009


Guilherme Polo <ggpolo at gmail.com> added the comment:

I'm closing this as won't fix but let me tell what you can do to solve
the problem yourself (this may be added somewhere else then, like in the
tkinter wiki).

First, check the keysym you get when pressing Shift-BackSpace:

import Tkinter

def show_key(event):
    print event.keysym, event.keycode, hex(event.keysym_num)

root = Tkinter.Tk()
root.bind("<Key>", show_key)

root.mainloop()

While running this I pressed Shift-BackSpace, this is what I got:

Shift_L 50 0xffe1
Terminate_Server 22 0xfed5

You can clearly see that Shift-BackSpace is assigned to something else
here, Terminate_Server. You can confirm this by doing:

$ xmodmap -pk | grep 0xfed5

     22    	0xff08 (BackSpace)	0xfed5 (Terminate_Server)	0xff08
(BackSpace)	0xfed5 (Terminate_Server)	0xff08 (BackSpace)	0xfed5
(Terminate_Server)

The second field in this output indicates that when I press the key 22
(BackSpace) while holding shift, a Terminate_Server is sent. For more
information about xmodmap you should consult its documentation.
Then, to fix the initial problem you can do the following:

$ xmodmap -e "keycode 22 = BackSpace"

But then it may happen that you can no longer issue a Ctrl-Alt-BackSpace
to finalize your X (till you end this session and start another, since
nothing was permanently saved here). To solve this issue I suggest
checking conflicts between xkb and xmodmap.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1482122>
_______________________________________


More information about the Python-bugs-list mailing list