Bug 125559 - Keycode 111 starts ksnapshot (hardcoded?)
Summary: Keycode 111 starts ksnapshot (hardcoded?)
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
: 133338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-14 12:44 UTC by Christian Berger
Modified: 2009-05-17 22:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to fix this (1.74 KB, patch)
2006-11-14 20:58 UTC, Benjamin K. Stuhl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Berger 2006-04-14 12:44:33 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages
OS:                Linux

I have a system which uses x11-evdev. My "UP"-Key has the keycode 111. Whenever I press it, ksnapshot starts. When ksnapshot is not installed Konqueror opens up with locate:ksnapshot.

Keycode 111 is the "Print Screen" button on regular keyboard. It might be a configuration error, but it also might be hardcoded somewhere.

I have set this report to "Crash" because my system once crashed when I pressed "Up" several times while editing a text. Essentially it tried to start ksnapshot a hundred times which crashes the system.

I believe that but should be simple to fix if one knows where to search for it.
Thank you verry much.
Comment 1 Christian Berger 2006-04-15 18:15:41 UTC
In some cases kded seems to crash. After that, all the button events seem to get sent to the application having the focus, then the button works again.
Comment 2 Thiago Macieira 2006-04-16 13:32:41 UTC
It is not hardcoded in KDE. Maybe it is in your distro. File a bug report with them.

Key 111 is PrintScreen. I suggest you fix your keyboard layout instead.
Comment 3 Matthias 2006-10-24 04:29:41 UTC
Thiago, this is definately a KDE bug, although it seems to happen only when you use the evdev driver instead of kbd.
I'm experiencing the same problem here, and my keyboard layout is all right. When i run just X, an xterm and xev, the up arrow works all right. Xev says the following when i press it:

KeyPress event, serial 30, synthetic NO, window 0xa00001,
    root 0x106, subw 0xa00002, time 2015542060, (53,32), root:(540,55),
    state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0xa00001,
    root 0x106, subw 0xa00002, time 2015542124, (53,32), root:(540,55),
    state 0x0, keycode 111 (keysym 0xff52, Up), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Comment 4 Matthias 2006-10-24 04:41:42 UTC
btw, my PrintScreen key works fine within KDE (xev says the following:
KeyPress event, serial 31, synthetic NO, window 0x3400001,
    root 0x106, subw 0x3400002, time 2016295874, (23,41), root:(1050,64),
    state 0x0, keycode 107 (keysym 0xff61, Print), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x3400001,
    root 0x106, subw 0x3400002, time 2016295938, (23,41), root:(1050,64),
    state 0x0, keycode 107 (keysym 0xff61, Print), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
)

As you can see, my PrintScreen key has the keycode 107 but X still recognizes it as being the PrintScreen key. KSnapShot doesn't seem to be triggered by the PrintScreen key itself but by keycode 111, which works as long as the kbd driver is used, but not with evdev :(
Comment 5 Benjamin K. Stuhl 2006-11-14 20:58:36 UTC
Created attachment 18556 [details]
patch to fix this

Here's a patch to skip the "fix PrtScn/SysRq confusion" hacks when the keycode
mappings are obviously different. It fixes the problem here, but someone with a
system that needs the hack should probably make sure I haven't broken things
there. (To test this with an evdev system, you will also need to run "setxkbmap
-keycodes evdev -model evdev" to work around bug 128822.)
Comment 6 Claus Hindsgaul 2006-11-29 12:57:54 UTC
Thank your for the patch, Benjamin!
I can confirm, that it fixed the problem for me on Debian Unstable.
It applies cleanly to the current source-deb "kdelibs" in Debian Unstable, and rebuilding the deb with Benjamins patch applied fixed the problem for me.

Claus Hindsgaul
Comment 7 Benjamin K. Stuhl 2006-12-08 06:15:36 UTC
Ok, I've applied the patch to KDE SVN... it should be in the next release (KDE 3.5.6).
Comment 8 Lubos Lunak 2007-01-02 14:25:05 UTC
*** Bug 133338 has been marked as a duplicate of this bug. ***
Comment 9 Tobias Kaminsky 2008-08-16 18:20:35 UTC
Hello, I am using Gentoo, today I tried Multiseat X. Therefore I needed the evdev driver for my keyboard.
Now I have the same problem. But I think it was solved?

I am using KDE 3.5.9.

Thank you!

Tobi
Comment 10 Tobias Kaminsky 2008-08-16 18:53:43 UTC
Sorry. My mistake. All is working fine!

Thanks
Tobi
Comment 11 Mac Michaels 2009-02-26 20:45:56 UTC
I ran into this abnormality and discovered it was caused by an error in my /etc/X11/xorg.conf file. When using x11-evdev deriver the "XkbModel" must be "evdev", not one of the names that works with the old keyboard driver. In my case "pc104" was specified and that caused the arrow keys to work as reported in this bug. 

If you must specify "XkbModel" use:

       Option "XkbModel" "evdev"

In the current stable gentoo release it is the default and need not be specified at all.

For Example:

Section "InputDevice"
        Identifier "Xkeyboard"
        Driver     "evdev"
        Option     "evBits"     "+1"
        Option     "keyBits"    "~1-255 ~352-511"
        Option     "Pass"       "3"
EndSection

The above options will automatically detect the keyboard base on configuration data in the Hardware Abstraction Layer (HAL). See the man page:

man evdev
Comment 12 Michael Jansen 2009-05-17 22:13:41 UTC
And it WAS hardcoded. http://websvn.kde.org/?view=rev&revision=969214