This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Shift+Backspace exhibits odd behavior
Type: Stage:
Components: Tkinter Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: gpolo, kbk, ncf, nnorwitz
Priority: normal Keywords:

Created on 2006-05-04 20:48 by ncf, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg28423 - (view) Author: NothingCanFulfill (ncf) Date: 2006-05-04 20:48
On Windows, pressing Shift+Backspace while in an editor
window will act just like a regular Backspace will,
however under Linux (Gentoo 2006.0 and
Slackware-current), instead of deleting the caracter
before the cursor, it inserts "^B".

Correct me if I'm wrong, but I don't think it'd be too
hard to fix this little annoyance.

(I would do it myself, but I'm not at all familiar with
IDLE's source layout)
msg28424 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2006-05-05 07:03
Logged In: YES 
user_id=33168

Right now there aren't a lot of IDLE developers.  It would
be great if you could work on a patch.
msg28425 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2006-07-23 05:07
Logged In: YES 
user_id=149084

Can't fix in IDLE by binding Shift-Key-BackSpace.

Using Python interpreter:

>>> import Tkinter
>>> root = Tkinter.Tk()
>>> text = Tkinter.Text()
>>> text.pack()

and try typing some char followed by
backspace and shift-backspace.

In Tcl shift-backspace works correctly.

Not an IDLE issue, appparently a Tkinter issue.
msg67672 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-06-03 19:19
I've tested this on Linux and on Tk 8.4 I got "\b", and the same
happened with Tkinter. On Linux, again, with Tk 8.5 I got a rectangle
char (something invalid), and this repeated at Tkinter.

This is not a Tkinter issue.
msg73186 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-09-13 13:53
I've just found some discussion about the problem here:

http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/577df9cfa39e6688/49484ac512f13693?lnk=gst&q=shift+backspace#49484ac512f13693

Hope this is enough to close this issue, as it is not a tkinter neither
idle issue.
msg78864 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-01-02 19:51
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.
msg78869 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-01-02 20:23
Just for future reference it is now on
http://tkinter.unpy.net/wiki/Linux_Shift-Backspace
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43321
2009-01-02 20:23:04gpolosetmessages: + msg78869
2009-01-02 19:51:24gpolosetstatus: open -> closed
resolution: wont fix
messages: + msg78864
2008-09-13 13:53:31gpolosetmessages: + msg73186
2008-06-03 19:19:44gpolosetnosy: + gpolo
messages: + msg67672
2006-05-04 20:48:32ncfcreate