[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    X key events and KGlobalAccel
From:       Willi Richert <w.richert () gmx ! net> (by way of Willi Richert
Date:       2003-08-15 22:16:44
[Download RAW message or body]

Hi,

It seems so simple but now I'm a little confused with the X system's key
events.

In essence I have in the constructor:

ga = new KGlobalAccel(0, "globalAccel");
ga->insert("omni_volumeUp", i18n("Special key volume up"),
		i18n("Special key volume up"),
		KShortcut(Qt::Key_VolumeUp), KShortcut(Qt::Key_VolumeUp), this,
		SLOT(volumeUp()), false);

and later:

void ShortcutTest::volumeUp()
{
	cout << "adsfasdf"<<endl;
}

In the attachment the modmap modification works correctly as you can see in
the xev.txt output. Nevertheless, my dummy app does not invoke volumeUp().

And I find now help between KKey, KNativeKey, KKeyEvent, QEvent, X11 symbols,
etc.

If you have some spare time, it would be nice to bring some light in my X11
darkness. If this problem is cleared, I can send you my omnibook kmilo
support.

Thanks,
wr

I have modified my xmodmap



["xe3-gf.modmap" (text/plain)]

keycode 178 = XF86WWW
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute


["xev.txt" (text/plain)]

KeyPress event, serial 27, synthetic NO, window 0x1800001,
    root 0x3b, subw 0x1800002, time 2278620, (48,36), root:(890,576),
    state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 27, synthetic NO, window 0x1800001,
    root 0x3b, subw 0x1800002, time 2278700, (48,36), root:(890,576),
    state 0x0, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyPress event, serial 27, synthetic NO, window 0x1800001,
    root 0x3b, subw 0x1800002, time 2280240, (48,36), root:(890,576),
    state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""

KeyRelease event, serial 27, synthetic NO, window 0x1800001,
    root 0x3b, subw 0x1800002, time 2280300, (48,36), root:(890,576),
    state 0x0, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:  ""


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic