Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Keycombo #686

Closed
JD5623 opened this issue Dec 6, 2020 · 9 comments
Closed

Unexpected Keycombo #686

JD5623 opened this issue Dec 6, 2020 · 9 comments
Labels
QtWebEngine port Related to new QtWebEngine port of Nuvola. type: bug Something is not working as expected or the documentation is incorrect.

Comments

@JD5623
Copy link

JD5623 commented Dec 6, 2020

Basic information

  • Your Linux distribution and its version: Arch Linux

  • Your desktop environment: Spectrwm

  • Nuvola Runtime version: 4.19.0

  • The web app you use and its version: Youtube Music 1.5.0

Describe the bug

My desktop has binded the key-combo WinLogo+j or WinLogo+k
for switching between windows, however the app
seems to interpret these combinations and scrolls through
the album layout.

Global keybindings are not enabled (no service installed as shown below), and I couldn't find any reference to these combinations in the app's default keybindings.
image

As a side note, I also logged in to my youtube account prior to experimenting this UI bug.

Expected behavior

The app shouldn't consume my keybinding.

Debugging log

Attach the debug log here:
youtubeMusic.log

Debugging

It is necessary to install the latest development version of Nuvola:

flatpak install nuvola eu.tiliado.NuvolaAppYoutubeMusic//master

Fedora 33 with GNOME 3.38.2 on Wayland:

  • Set global keyboard shortcut Win+K to launch command notify-send test - it shows a test notification.
  • Press Win+K.
    • test notification is shown.
  • Launch flatpak run --env=VALACEF_DEBUG_KEYS=yes eu.tiliado.NuvolaAppYoutubeMusic//master -D.
  • Press k.
    • test notification is not shown.
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube Music switches to the previous track.
Runner: [DEBUG Δ08s560570us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=75 native_code=45 character='k'|'k'
Runner: [DEBUG Δ002196us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=107 native_code=45 character='k'|'k'
Runner: [DEBUG Δ092443us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=75 native_code=45 character='k'|'k'
  • Press j.
    • test notification is not shown,
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube music switches to the next track.
Runner: [DEBUG Δ05s155754us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ000339us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=106 native_code=44 character='j'|'j'
Runner: [DEBUG Δ094893us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=74 native_code=44 character='j'|'j'
  • Press Win+K
    • test notification is shown.
    • ✅ YouTube Music does not receive keys.
    • ✅ YouTube music does nothing.
No keys logged.
  • Press Win+J
    • test notification is not shown.
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube music does nothing.
Runner: [DEBUG Δ09s303938us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=128=COMMAND_DOWN win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ000268us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=128=COMMAND_DOWN win_code=106 native_code=44 character='j'|'j'
Runner: [DEBUG Δ062673us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=128=COMMAND_DOWN win_code=74 native_code=44 character='j'|'j'

Fedora 33 with GNOME 3.38.2 on Xorg:

  • Set global keyboard shortcut Win+K to launch command notify-send test - it shows a test notification.
  • Press Win+K.
    • test notification is shown.
  • Launch flatpak run --env=VALACEF_DEBUG_KEYS=yes eu.tiliado.NuvolaAppYoutubeMusic//master -D.
  • Press k.
    • test notification is not shown.
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube Music switches to the previous track.
Runner: [DEBUG Δ02s218004us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=75 native_code=45 character='k'|'k'
Runner: [DEBUG Δ000669us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=107 native_code=45 character='k'|'k'
Runner: [DEBUG Δ094231us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=75 native_code=45 character='k'|'k'
  • Press j.
    • test notification is not shown,
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube music switches to the next track.
Runner: [DEBUG Δ635772us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ007947us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=106 native_code=44 character='j'|'j'
Runner: [DEBUG Δ078028us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=74 native_code=44 character='j'|'j'
  • Press Win+K
    • test notification is shown.
    • ✅ YouTube Music does not receive keys.
    • ✅ YouTube music does nothing.
(No keys logged.)
  • Press Win+J
    • test notification is not shown.
    • ✅ YouTube Music does receive keys.
    • ✅ YouTube music does nothing.
Runner: [DEBUG Δ12s857808us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=128=COMMAND_DOWN win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ000203us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=128=COMMAND_DOWN win_code=106 native_code=44 character='j'|'j'
Runner: [DEBUG Δ070179us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=128=COMMAND_DOWN win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ327857us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=128=COMMAND_DOWN win_code=91 native_code=133 character=''|''

Arch Linux/Spectrwm/Xorg

  • Launch flatpak run --env=VALACEF_DEBUG_KEYS=yes eu.tiliado.NuvolaAppYoutubeMusic//mater -D.

  • Press 'Win'.

  • what's the result?

  • ✅ YouTube music does nothing.
    Runner: [DEBUG Δ04s595975us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=91 native_code=133 character=''|''
    Runner: [DEBUG Δ062913us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=128=COMMAND_DOWN win_code=91 native_code=133 character=''|''

  • Press j.

    • What's the result?
    • ✅ YouTube music skips to the next track.
Runner: [DEBUG Δ31s873659us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=74 native_code=44 character='j'|'j'
Runner: [DEBUG Δ000456us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=106 native_code=44 character='j'|'j'
Runner: [DEBUG Δ047337us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=74 native_code=44 character='j'|'j'
  • Press k.
    • What's the result?
    • ✅ YouTube music skips to the previous track.
Runner: [DEBUG Δ11s713007us CefGtk] WebView.vala:583: Key event KEYEVENT_RAWKEYDOWN: modifiers=0= win_code=75 native_code=45 character='k'|'k'
Runner: [DEBUG Δ000359us CefGtk] WebView.vala:583: Key event KEYEVENT_CHAR: modifiers=0= win_code=107 native_code=45 character='k'|'k'
Runner: [DEBUG Δ038644us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=0= win_code=75 native_code=45 character='k'|'k'
  • Press Win+j, also test with Press 'Win+k':
    • What's the result?
  • ❓ YouTube Music is unpredictable, it receives keys according to the duration/timing of my keystroke.
    This was when I pressed the Win + j or Win+k (this one event happened at random, not consistent)

Runner: [DEBUG Δ17s119074us CefGtk] WebView.vala:583: Key event KEYEVENT_KEYUP: modifiers=128=COMMAND_DOWN win_code=91 native_code=133 character=''|''

Sometimes it can return both the events from Win Key and a normal j/k key press,
or when I press the combo slightly faster it can return nothing,
or at times it can just return the event from the Win Key.

@jiri-janousek jiri-janousek added the type: bug Something is not working as expected or the documentation is incorrect. label Dec 6, 2020
@jiri-janousek
Copy link
Member

Hello @JD5623, thanks for reporting your issue.

YouTube Music itself interprets keys j and k. It looks as if the Win modifier was ignored or lost on its way from the Nuvola's window to the web engine. Also, I've always thought that captured global keybindings are not propagated to desktop windows at all.

Do you use Xorg or Wayland?

@jiri-janousek jiri-janousek added the QtWebEngine port Related to new QtWebEngine port of Nuvola. label Dec 6, 2020
@JD5623
Copy link
Author

JD5623 commented Dec 12, 2020

@fenryxo I'm currently on Xorg, I get my session through lightdm.

jiri-janousek added a commit to tiliado/valacef that referenced this issue Dec 12, 2020
VALACEF_DEBUG_KEYS=yes G_MESSAGES_DEBUG=all make run

Issue: tiliado/nuvolaplayer#686
@jiri-janousek
Copy link
Member

Hello @JD5623, could you help me with debugging? You need to install the latest development version of Nuvola and then post logged keys - see section Debugging in the issue description.

@jiri-janousek jiri-janousek added the need info Assignee needs more information to work on this ticket. label Dec 12, 2020
@jiri-janousek jiri-janousek removed the QtWebEngine port Related to new QtWebEngine port of Nuvola. label Dec 12, 2020
@jiri-janousek
Copy link
Member

Only section Arch Linux/Spectrwm/Xorg is for you, the rest are notes from my testing.

@JD5623
Copy link
Author

JD5623 commented Dec 12, 2020

Hello @JD5623, could you help me with debugging? You need to install the latest development version of Nuvola and then post logged keys - see section Debugging in the issue description.

@fenryxo Recently tested with a fresh flatpak install, already updated the Arch section.

@JD5623
Copy link
Author

JD5623 commented Dec 12, 2020

I think I have a working idea of what's going on:

I suspect that since my desktop window manager forces windows to "grab" onto the side/top/bottom
of the screen (Better known as tiling), the wierd behavior only happens
when I swap the youtube window with another, i.e: From the left pane with right pane.

It seems to me that the app does not update to the new X,Y positions on the screen,
or it could just be a GTK/libX11 bug on my end. In whatever case this triggers 'Win + j'
or 'Win + k' keystrokes to be taken as regular k or j strokes.

Though not ideal, letting the youtube app float so it can be moved freely seems to do the trick,
at least until there's better integration on things like Gnome from PopOS (is also tiling, btw).

@JD5623
Copy link
Author

JD5623 commented Dec 12, 2020

I think I have a working idea of what's going on:

I suspect that since my desktop window manager forces windows to "grab" onto the side/top/bottom
of the screen (Better known as tiling), the wierd behavior only happens
when I swap the youtube window with another, i.e: From the left pane with right pane.

It seems to me that the app does not update to the new X,Y positions on the screen,
or it could just be a GTK/libX11 bug on my end. In whatever case this triggers 'Win + j'
or 'Win + k' keystrokes to be taken as regular k or j strokes.

Though not ideal, letting the youtube app float so it can be moved freely seems to do the trick,
at least until there's better integration on things like Gnome from PopOS (is also tiling, btw).

This only fixes half of the problem, the keystroke timing issue still remains.

@jiri-janousek jiri-janousek added QtWebEngine port Related to new QtWebEngine port of Nuvola. and removed need info Assignee needs more information to work on this ticket. labels Dec 12, 2020
@jiri-janousek
Copy link
Member

I'm afraid there is nothing I can do in Nuvola. It seems that your window manager somehow leaks keys from global keyboard shortcuts to application windows. We may revisit the issue once Nuvola is ported to QtWebEngine.

@jiri-janousek jiri-janousek mentioned this issue Dec 27, 2020
1 task
@jiri-janousek
Copy link
Member

I'm closing this ticket as Nuvola Player has discontinued active development. We are going to provide only integration bug fixes on a best-effort basis until the final End-of-Life on December 31, 2022. I'm sorry that I haven't managed to resolve this ticket in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QtWebEngine port Related to new QtWebEngine port of Nuvola. type: bug Something is not working as expected or the documentation is incorrect.
Projects
None yet
Development

No branches or pull requests

2 participants