This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KWin keyboard control conflicts with Minecraft

Tags: None
(comma "," separated)
User avatar
herredgar
Registered Member
Posts
3
Karma
0
OS
Hey folks,

I suffer from a really strange bug within Minecraft. While opening the inventory and moving items to the crafting field, I use the SHIFT+MOUSEBUTTON1 shortcut to move alle peaces at once, which leads to a kind of lock-in. After pressing the shortcut I cannot move any item with the mouse anymore. It's as the SHIFT button gets sticky. Now that sounds like an upstream bug you will say, but I made two additional observations:

  • it does not occur on osx or linux with i3wm
  • trying to re-assign the keycode for sneak with SHIFT doesn't detect the SHIFT key at all

Hence, there must be something really shaky in that triumvirate of KDE, MC and Java. My gut says it has something to do with the keyboard control of KDE/KWin. Any Idea?

greets

p.s.
minecraft 1.1
java 1.6.0_30
kde 4.8
x86_64

p.p.s. repost of https://bbs.archlinux.org/viewtopic.php?id=135495
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Are you sure it's not just the lwjgl bug with stuck keys? See http://www.minecraftforum.net/topic/134 ... -solution/ for example.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
herredgar
Registered Member
Posts
3
Karma
0
OS
Nope, it didn't work. :(
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Have you tried (Right Click on Window Decoration) > Advanced > Special Window Settings > Appearance & Fixes, and checking "Ignore global shortcuts" and specifying "Force"?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
herredgar
Registered Member
Posts
3
Karma
0
OS
bcooksley wrote:Have you tried (Right Click on Window Decoration) > Advanced > Special Window Settings > Appearance & Fixes, and checking "Ignore global shortcuts" and specifying "Force"?


I tried, but this idea hasn't solved it either…LSHIFT is not to be assigned, the other keys work fine though.(even RSHIFT), but still the same lock-in.

May it be a problem of my somewhat exotic keyboard layout? It is a German one, but in the NEO2 variant.

EDIT: tried other layouts, the same
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Have you checked to see which application is assigned to this global shortcut?

You can do this in any KDE application by attempting to assign the keyboard combination to any other global shortcut. If it conflicts, then you will be given the opportunity to clear the conflict - at which point you can then clear the new association - leaving the shortcut unused.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
luebking
Karma
0
A global shortcut issue is unlikely since KAction does -yet- not support mouse shortcuts.
Such is the SHIFT key (alone!) no longer working would be caused by kwin.

a) are you sure it's triggered by the shift key and not just happens after the first mouse click?
b) Wild guess: the mouse related effects (mouse mark and esp. track mouse) - while not really likely, i'd ruled them out first (just deactivate them)
c) check whether sth. actually grabs the SHIFT key. Run "xev" (from konsole, you need to see the output. Don't be scared), ensure the mouse is NOT on the xev window (or the output will scare you ;-) and press, hold and release the SHIFT key. Is the input recognized?
d) Is /only/ the shift key affected in /only/ minecraft, ie. you can assign and use other keys in minecraft as well as the SHIFT key still works as expected eg. in kwrite?
e) i know virtually nothing about minecraft (virtual lego?) but if there're know GL handling issues, you should try to suspend the compositor (press "SHIFT+Alt+F12", resumes the same way) and check whether using minecraft (restart it to a state where SHIFT would usually still work) works w/o
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I still believe it's a lwjgl problem (simply because I've experienced the same thing). To make sure it's not KWin, you can try another window manager and see if you can reproduce the problem.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
luebking
Karma
0
according to the OP it does no happen with i3wm - what
a) is another WM ;-)
b) makes me wonder whether this could "somehow" be related to tiling in kwin

Nevertheless, i have no idea where kwin would grab esp. the SHIFT key (actually the keyboard is only grabbed during the alt+l/rmb window move/resize so you can release the alt key) so would initially blame the client first (esp. all java toolkits tend to do freaky stuff AND minecraft apparently has a record on stuck keys)
luebking
Karma
0
To ensure it is NOT a global shortcut thing, just "pkill kglobalaccel" (but NO global shortcuts will work after this, including alt+tab etc. - restarting kglobalaccel will however fix that as well)
julkip
Registered Member
Posts
12
Karma
0
OS
Hi

I have exactly the same bug. BUT i have found a workaround for it. If you press F11 after shift got stuck in the Menu it gets unstuck. F11 switches from Fullscreen to Windowed Mode. Unfortunately my Minecraft crashes about 80% of the time when i switch, but when it works it works.

And its not a global shortcut problem, I just killed kglobalaccel.

Funny though, a friend of mine who has an almost identical setup to mine (Arch Linux 64 bit, openJDK7 and KDE) doesn't have the problem at all…
Drezil
Registered Member
Posts
1
Karma
0
same problem for me after i updated to 13.04.

Worked flawlessly before.

Its both shift-keys.

Disabled all shortcuts, compositing etc.

Temporary solution: switch focus to another window and back.
(i have focus follows mouse wtih a 250ms activation-delay if that matters)

xev yields:
KeyPress event, serial 40, synthetic NO, window 0x5800001,
root 0xa9, subw 0x0, time 4392976, (-318,846), root:(526,869),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x5800001,
root 0xa9, subw 0x0, time 4393090, (-318,846), root:(526,869),
state 0x1, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x5800001,
root 0xa9, subw 0x0, time 4398413, (-318,846), root:(526,869),
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x5800001,
root 0xa9, subw 0x0, time 4398503, (-318,846), root:(526,869),
state 0x1, keycode 62 (keysym 0xffe5, Caps_Lock), same_screen YES,
XKeysymToKeycode returns keycode: 50
XLookupString gives 0 bytes:
XFilterEvent returns: False


and the java-test-tool (http://docs.oracle.com/javase/tutorial/ ... tener.html - under "try this") gets the right input as well.

Im using the current (2.9 lwjgl). Tried the older (2.8.5) before, which worked under 12.10.

----

Edit: wont work as well under openbox -> looks not kwin-related.
luebking
Karma
0
there's something /severely/ wrong here:

KeyPress event, serial 40, synthetic NO, window 0x5800001,
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,

KeyRelease event, serial 40, synthetic NO, window 0x5800001,
state 0x1, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,

KeyPress event, serial 40, synthetic NO, window 0x5800001,
state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,

KeyRelease event, serial 40, synthetic NO, window 0x5800001,
state 0x1, keycode 62 (keysym 0xffe5, Caps_Lock), same_screen YES,

-> shift turns into caps/lock on release.
Did you configure anything (related capslock) in the last tab of "kcmshell4 keyboard"?
What's the output of "setxkbmap -query"?
JustK
Registered Member
Posts
1
Karma
0
I have the same problem, while also using KDE with the neo2 keyboard layout.

xev also shows capslock being triggered:
Code: Select all
KeyPress event, serial 40, synthetic NO, window 0x4600001,
    root 0x127, subw 0x0, time 26389479, (609,662), root:(1538,685),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x4600001,
    root 0x127, subw 0x0, time 26389543, (609,662), root:(1538,685),
    state 0x1, keycode 50 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x4600001,
    root 0x127, subw 0x0, time 26402725, (609,662), root:(1538,685),
    state 0x0, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x4600001,
    root 0x127, subw 0x0, time 26402797, (609,662), root:(1538,685),
    state 0x1, keycode 62 (keysym 0xffe5, Caps_Lock), same_screen YES,
    XKeysymToKeycode returns keycode: 50
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


setxkbmap -query
Code: Select all
rules:      evdev
model:      cymotionlinux
layout:     de,de
variant:    neo,deadgraveacute
options:    compose:rwin,grp:sclk_toggle,grp_led:scroll


The scroll key is configured the switch between layouts.
luebking
Karma
0
Compare https://bugreports.qt-project.org/browse/QTBUG-26484 - the behavior for the NEO layout seems to be intended, what means the Shift Key is never released.

If minecraft has no (hard) keyboard input requirements (like a texteditor), you could try to setup a window rule to forcefully not let it take the input focus -> does that work?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar