Closed Bug 46992 Opened 25 years ago Closed 25 years ago

ctrl-backspace and ctrl-delete do not send correct keycode

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: Brade, Assigned: pavlov)

Details

(Keywords: helpwanted, Whiteboard: [nsbeta3-])

ctrl-backspace and ctrl-delete do not send correct keycode While trying to fix bug #41078, I found that control-delete doesn't send VK_DELETE to the xul keylistener, instead the OS is sending a capital Beta character (Greek symbol; 233 decimal if I remember correctly). For Control- Backspace, the character 'h' is sent. The proper keycodes *are* sent if the control key is not pressed. NOTE: This is a bug in the OS possibly??
Keywords: correctness, nsbeta3
need info: Is this still reproducible? What are those keys needed for? Is there any workaround?
Whiteboard: [need info]
Whiteboard: [need info] → [need info] going...going...
nsbeta3-, ->future. Please renominate with more info if you don't agree.
Whiteboard: [need info] going...going... → [nsbeta3-]
Target Milestone: --- → Future
Not sure if this is related, but win98 20000818: Pressing shift or ctrl while pressing backspace or delete causes nothing to happen, whereas in other applications, Windows quietly ignores the shift or control and backspaces or deletes appropriately. Why is this a big deal? For those of us like me who suck at typing, and sometimes leave their fingers on Shift when hitting backspace, and it doesn't do anything. If this is completely unrelated to the original reporter's bug, tell me and I'll quietly go away (and file a new bug).
I too have noticed the Shift + BS problem on my system. Not sure if it is a separate bug from the original one filed here, though. Let's say I make a mistake while typing something in ALL CAPZ^HS I'm not going to let go of the shift key just to hit the backspace. With mozilla, the backspace is useless when used in this manner. Perhaps a new bug should be filed that explicitly describes this problem.
It sounds like what you're describing are scenarios that would be caused by the originally described defect. I still don't think this makes our short list for nsbeta3, but we'd consider a good patch. ->helpwanted.
Keywords: helpwanted
You might want to take a look at my patch for bug 50252. The issue in that bug turned out to be that gtk, for some reason, when you get a control-[alpha], sets the string to the ordinal number of the character rather than the character itself, e.g. for ctrl-A you get \001 rather than a, and so there was code (which was always being applied) to add 'a' - 1 or 'A' - 1. I fixed 50252 with a patch that says if isprint() and isalpha(), then return the character, otherwise do the +'a'-1 thing. The isprint() means it won't fix this bug directly -- you still need to find a way to distinguish the codes you want to send directly, and of course, backspace will send a ctrl-h (\008) whereas h will send 'h' - 'a' + - (\008). So I don't see how we'll be able to tell them apart. This seems like really broken behavior on gtk's part. Pav, any idea why it does this and whether there's another way to tell them apart?
Just FYI, my Shift+BS problem is on a Win32 system. Shift+Backspace on mozilla doesn't work. With IE and Netscape, no problem.
sorry I haven't been able to respond sooner, I've been away on vacation. This is a GTK-specific bug. The windows problem described should be filed as a new bug (please cc me on that bug).
I just checked in a fix for bug 50252 which should fix this as well (on Unix; as Kathy said, any problems on Windows would be a separate bug). Marking fixed.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
using 2000.10.03.xx-n6 [opt commercial branch bits], shift+backspace works (ie, just like backspace). however, ctrl+backspace, ctrl+delete and shift+delete do nothing. akkana, what in particular was fixed here? or did i just stumble into a regression (and thus should reopen this)?
What was fixed was the keycodes they sent -- so if there are any bindings on those keycodes, they wouldn't have worked. I'm not sure of whether we actually have bindings to these keys in the current key binding list (the un-modified keys should work, of course, but they're handled in the editor via a direct event handler, not via xul or xbl bindings) so I'm not sure whether this is testable or not, without explicitly setting up bindings to e.g. ctrl-delete and seeing if they work.
hm, okay, rubberstamp vrfy.
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.