Bug 400658 - Impossible to walk through all apps or all windows of the current app on Wayland while numlock is enabled
Summary: Impossible to walk through all apps or all windows of the current app on Wayl...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.17.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Roman Gilg
URL:
Keywords: wayland
: 403315 415127 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-04 12:07 UTC by Patrick Silva
Modified: 2020-04-16 14:47 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.18.0


Attachments
keyboard tab (66.95 KB, image/png)
2019-07-22 15:46 UTC, Patrick Silva
Details
input events tab after shortcut failure (88.83 KB, image/png)
2019-07-22 15:46 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2018-11-04 12:07:56 UTC
SUMMARY
On Wayland it's impossible to walk through all windows or through all windows of the current app when three or more windows are open. You can only switch between two windows because both tab and ~ keys do not work while you hold alt key.

STEPS TO REPRODUCE
1. open three different apps or three windows of the same app, firefox, for example.
2. with three open apps, press alt+tab and hold alt key. Try to focus the third app by pressing tab key again
3. with three windows of the same app, press alt+~ and hold alt key. Try to focus the third window by pressing ~ again

OBSERVED RESULT
nothing happens when you press tab or ~ keys while hold alt.

EXPECTED RESULT
tab and ~ keys should work when pressed while you hold alt.

SOFTWARE VERSIONS
KDE neon Developer Edition
KDE Plasma: 5.14.80
Qt: 5.11.2
KDE Frameworks: 5.52.0
Comment 1 Martin Flöser 2018-11-04 12:58:29 UTC
Do I understand correctly that you switch from alt+tab to alt+~ in one alt+tab session?
Comment 2 Patrick Silva 2018-11-04 13:35:01 UTC
(In reply to Martin Flöser from comment #1)
> Do I understand correctly that you switch from alt+tab to alt+~ in one
> alt+tab session?
Sorry.
alt+tab and alt+~ are different sessions.
First reproduce the problem (impossible to walk through the windows) with windows of different apps by pressing alt+tab.
After reproduce the same problem with windows of current app by pressing alt+~.
Comment 3 Martin Flöser 2018-11-04 15:55:17 UTC
Please provide the output of
qdbus org.kde.KWin /KWin supportInformation
Comment 4 Patrick Silva 2018-11-04 16:47:59 UTC
Version
=======
KWin version: 5.14.80
Qt Version: 5.11.2
Qt compile version: 5.11.2
XCB compile version: 1.13

Operation Mode: Xwayland

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 11906000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.breeze
Theme: 
Blur: 0
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 2, 9
decorationButtonsRight: 6, 3, 4, 5
borderSize: 3
gridUnit: 10
font: Noto Sans,10,-1,0,50,0,0,0,0,0,Regular
smallSpacing: 2
largeSpacing: 10

Platform
==========
Name: DRM
Active: true
Atomic Mode Setting: true

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 2
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: false
glPreferBufferSwap: 101
glPlatformInterface: 2
windowsBlockCompositing: true

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 150
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 1

Screen 0:
---------
Name: LP140WHU-TLB LVDS-1-desconhecido
Geometry: 0,0,1366x768
Scale: 1
Refresh Rate: 59.989


Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL platform interface: EGL
OpenGL shading language version string: 1.30
Driver: Intel
GPU class: IvyBridge
OpenGL version: 3.0
GLSL version: 1.30
Mesa version: 18.0.5
Linux kernel version: 4.18.8
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
kwin4_effect_fade
kwin4_effect_dialogparent
kwin4_effect_squash
kwin4_effect_login
kwin4_effect_frozenapp
kwin4_effect_maximize
magnifier
kwin4_effect_morphingpopups
kwin4_effect_windowaperture
kwin4_effect_translucency
kwin4_effect_logout
slidingpopups
slide
screenshot
desktopgrid
colorpicker
presentwindows
highlightwindow
blur
contrast
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
kwin4_effect_fade:
isActiveFullScreenEffect: false

kwin4_effect_dialogparent:
isActiveFullScreenEffect: false

kwin4_effect_squash:
isActiveFullScreenEffect: false

kwin4_effect_login:
isActiveFullScreenEffect: false

kwin4_effect_frozenapp:
isActiveFullScreenEffect: false

kwin4_effect_maximize:
isActiveFullScreenEffect: false

magnifier:
magnifierSize: 
targetZoom: 1

kwin4_effect_morphingpopups:
isActiveFullScreenEffect: false

kwin4_effect_windowaperture:
isActiveFullScreenEffect: false

kwin4_effect_translucency:
isActiveFullScreenEffect: false

kwin4_effect_logout:
isActiveFullScreenEffect: false

slidingpopups:
slideInDuration: 150
slideOutDuration: 250

slide:
duration: 500
horizontalGap: 45
verticalGap: 20
slideDocks: false
slideBackground: true

screenshot:

desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

colorpicker:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

blur:

contrast:

startupfeedback:
type: 1

screenedge:

kscreen:
Comment 5 Martin Flöser 2018-11-04 18:59:23 UTC
Meh support information doesn't include alt+tab settings.
Comment 6 Alexander Mentyu 2018-11-12 12:38:36 UTC
Cannot reproduce Alt+~ bug with Firefox, Chromium, Dolphin windows on:

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
Qt Version: 5.11.2
KDE Frameworks Version: 5.52.0
Kernel Version: 4.15.0-36-generic
Comment 7 Patrick Silva 2018-11-29 19:59:50 UTC
I reinstalled neon dev unstable a few days ago and I can't reproduce the bug anymore.
Comment 8 Patrick Silva 2019-02-09 20:06:53 UTC
This annoying problem is back with plasma 5.15 beta.

I use alt+tab to walk through all apps and alt + ' (alt + key above TAB key)
to walk through windows of the current app. These same shorcuts work as expected under X11.
Comment 9 Luca Weiss 2019-03-15 19:37:27 UTC
I have this problem on Arch in a Wayland session with Plasma 5.15.3
Comment 10 Markus Rathgeb 2019-03-16 12:46:58 UTC
What's the difference between this and #403315
Comment 11 Nate Graham 2019-03-16 21:17:32 UTC
*** Bug 403315 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2019-03-16 21:18:25 UTC
None, it appears to be a duplicate. Migrating the most relevant comment there over to here:

> My .config/kcminputrc contains that keyboard section:
> 
> ===
> [Keyboard]
> KeyboardRepeating=0
> NumLock=0
> RepeatDelay=600
> RepeatRate=25
> ===
> 
> I don't know what's wrong here, but if I remove that keyboard section the
> Alt + Tab behaves as normal.
Comment 13 Nate Graham 2019-03-18 08:41:47 UTC
From Bug 403315, apparently it's the num lock that triggers this.
Comment 14 Patrick Silva 2019-03-18 11:05:53 UTC
The problem is numlock setting in system settings > input devices > keyboard.
When I set numlock to "Off" or "Unchanged", both alt+tab and alt+' shortcuts work as expected. When I set it to "On", the same shortcuts fail.

Operating System: Arch Linux 
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2
Comment 15 Patrick Silva 2019-04-01 15:44:08 UTC
In fact the problem occurs when numlock is enabled.
If I disable numlock on Wayland session,
the shotcuts work even if numlock is set to 'Turn on" in keyboard kcm. 

Operating System: Arch Linux 
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.56.0
Qt Version: 5.13.0 beta1
Comment 16 Markus Rathgeb 2019-07-19 11:57:52 UTC
It his problem very complicated to fix, not very important or is there just not enough free time?
Which component is responsible for the keystroke handling?
Comment 17 Martin Flöser 2019-07-19 19:20:34 UTC
What's the used keyboard layout?
Comment 18 Patrick Silva 2019-07-19 20:35:56 UTC
Mine is brazilian portuguese (abnt2).
Comment 19 Martin Flöser 2019-07-20 07:26:36 UTC
Can you please try with us layout?
Comment 20 Patrick Silva 2019-07-20 11:37:09 UTC
Same problem with us layout.
Comment 21 Markus Rathgeb 2019-07-22 04:48:55 UTC
$ localectl status
   System Locale: LANG=en_US.utf8
       VC Keymap: de-latin1
      X11 Layout: de
       X11 Model: pc105
     X11 Options: terminate:ctrl_alt_bksp

For KDE: systemsettings5, Hardware: Input Devices, Keyboard:
Hardware: Keyboard Model: Generic | Generic 105-key PC (intl.)
Layouts: Map: de, Layout: German, Variant: German (no dead keys), Label:de, Shortcut:
Comment 22 Martin Flöser 2019-07-22 14:35:56 UTC
Could you please open KWin debug console and check in the input event tab what keysyms are reported when triggering the not working shortcut. Also the keyboard tab could be interesting as it lists the active modifiers.
Comment 23 Markus Rathgeb 2019-07-22 14:42:12 UTC
> KWin debug console and check in the input event tab

Please excuse my question:
Where can I find the "KWin debug console"?

Is it a separate application?
Comment 24 Patrick Silva 2019-07-22 15:46:14 UTC
Created attachment 121678 [details]
keyboard tab
Comment 25 Patrick Silva 2019-07-22 15:46:48 UTC
Created attachment 121679 [details]
input events tab after shortcut failure
Comment 26 Martin Flöser 2019-07-22 19:00:22 UTC
Interesting, so numlock is not active, but a "mod2". The event resolving shows Keypad modifier to be active. Something is weird.
Comment 27 Markus Rathgeb 2019-07-22 19:07:49 UTC
Same here.

Current Layout: German (no dead keys)

Active Modifiers: Mod2 (if num lock is activated)
Active LEDs: Num Lock (if num lock is activated)

"Input Events" for Num Lock press / release shows:
Scan code: 69
Xkb symbol: 65407
Modifiers shows Keypad if num lock as activated
Comment 28 Patrick Silva 2019-12-14 00:11:10 UTC
*** Bug 415127 has been marked as a duplicate of this bug. ***
Comment 29 Roman Gilg 2019-12-30 13:41:03 UTC
Git commit 514a95f1e43cb0a694850d946b36c91c3e86fa9d by Roman Gilg.
Committed on 30/12/2019 at 13:41.
Pushed by romangilg into branch 'master'.

Set Qt::KeypadModifier depending on current keysym

Summary:
The Qt::KeypadModifier should only accompany a keysym when this specific keysym
originates from the keypad not in general for every keysym while numlock is
engaged.
FIXED-IN: 5.18.0

Test Plan: Manually with the Thumbnail Grid task switcher and numlock enabled.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26283

M  +1    -1    xkb.cpp
M  +7    -2    xkb_qt_mapping.h

https://commits.kde.org/kwin/514a95f1e43cb0a694850d946b36c91c3e86fa9d
Comment 30 Olav Seyfarth 2020-04-16 14:47:56 UTC
Not sure whether I should necrobump this bug, please advise where to report.

I am on a up-to-date plain Arch/Xorg/Plasma, newly installed, no other desktop environments installed. In KWin shortcuts I see Alt-Tab for walk and Alt-Shift-Backtab for reverse walk. However, I don't get what "Backtab" actually is … I had expected to see "Alt-Shift-Tab" here. I also cannot enter that combination. If I do, I get "Alt-Tab", Shift is ignored. Which then leads to a conflict, sure, and I abort. When I do "Shift+Alt+Tab", I end up with "Shift-Tab", so "Alt" is ignored. Apart from that I would not want this shortcut, it also does not work as expected: Shift-Tab switches to the Window N-1 but releasing and pressing Tab again does NOT cycle further back. Now: Where should I put this, and what should I provide?