You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, March 9th 2009, 11:30pm

Ctrl-w maybe intercepted by KDE, need it for emacs

I just noticed that the combination Ctrl-w is not triggering "kill-region" in emacs as expected. This is true if I open "emacs -nw" in Konsole, in Eterm, or if I allow it to open its own GUI window. I'm running Mandriva One 2009 with KDE 4.1.

If I bring up the list of all key-bindings in emacs (Ctrl-h b), C-w is indeed listed as bound to kill-region. But if I do Ctrl-h Ctrl-w to get help for a key combination, emacs doesn't receive the sequence. That last bit works fine for other sequences.

If I try it in a virtual console (Ctrl-Alt-F3), the Ctrl-w key binding works fine in emacs.

If I open kcontrol (from command line, it's unavailable in Mandriva menus), and check Regional&Accessibility, nothing seems to be amiss.

There is a big difference between the xev outputs generated by Ctrl-y and Ctrl-w, as below:

Ctrl-y, works fine

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
KeyPress event, serial 34, synthetic NO, window 0x3e00001,
root 0x2ed, subw 0x0, time 1176552699, (66,571), root:(721,594),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False 

KeyPress event, serial 34, synthetic NO, window 0x3e00001,
root 0x2ed, subw 0x0, time 1176553056, (66,571), root:(721,594),
state 0x14, keycode 29 (keysym 0x79, y), same_screen YES, 
XLookupString gives 1 bytes: (19) "" 
XmbLookupString gives 1 bytes: (19) "" 
XFilterEvent returns: False 

KeyRelease event, serial 34, synthetic NO, window 0x3e00001,
root 0x2ed, subw 0x0, time 1176553149, (66,571), root:(721,594),
state 0x14, keycode 29 (keysym 0x79, y), same_screen YES, 
XLookupString gives 1 bytes: (19) "" 
XFilterEvent returns: False 

KeyRelease event, serial 34, synthetic NO, window 0x3e00001,
root 0x2ed, subw 0x0, time 1176554134, (66,571), root:(721,594),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False


Ctrl-w, intercepted

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
KeyPress event, serial 34, synthetic NO, window 0x4000001,
root 0x2ed, subw 0x0, time 1176787194, (165,-11), root:(820,12),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

FocusOut event, serial 34, synthetic NO, window 0x4000001,
mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 34, synthetic NO, window 0x4000001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 34, synthetic NO, window 0x0,
keys: 4294967277 0 0 2 32 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

KeyRelease event, serial 34, synthetic NO, window 0x4000001,
root 0x2ed, subw 0x0, time 1176787466, (165,-11), root:(820,12),
state 0x14, keycode 25 (keysym 0x77, w), same_screen YES,
XLookupString gives 1 bytes: (17) ""
XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x4000001,
root 0x2ed, subw 0x0, time 1176787735, (165,-11), root:(820,12),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False


I'm not sure what that means or where to look next. I would like to prevent Ctrl-w from being intercepted so that I can use it in emacs.
I'd be very grateful if you could point me in the right direction.