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

[Skia][Gtk] Number Keypad Enter key is not mapped properly #5000

Closed
2 of 24 tasks
jeromelaban opened this issue Jan 22, 2021 · 6 comments · Fixed by #6426
Closed
2 of 24 tasks

[Skia][Gtk] Number Keypad Enter key is not mapped properly #5000

jeromelaban opened this issue Jan 22, 2021 · 6 comments · Fixed by #6426
Assignees
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Something isn't working project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...)

Comments

@jeromelaban
Copy link
Member

Current behavior

unoplatform/calculator#347

How to reproduce it (as minimally and precisely as possible)

Use the calculator on Linux snap

Workaround

Use the other enter key.

Environment

Nuget Package:

  • Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
  • Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
  • Uno.SourceGenerationTasks
  • Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
  • Other:

Nuget Package Version(s):

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • macOS
  • Skia
    • WPF
    • GTK (Linux)
    • Tizen
  • Windows
  • Build tasks
  • Solution Templates

IDE:

  • Visual Studio 2017 (version: )
  • Visual Studio 2019 (version: )
  • Visual Studio for Mac (version: )
  • Rider Windows (version: )
  • Rider macOS (version: )
  • Visual Studio Code (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

@jeromelaban jeromelaban added kind/bug Something isn't working project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...) labels Jan 22, 2021
@jeromelaban jeromelaban added the difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. label Feb 15, 2021
@ZCostello
Copy link

Hi has anyone taken this on yet? I may have a go if not...

@jeromelaban
Copy link
Member Author

@ZCostello You're welcome to take a look! We've not gotten to this yet, but it's likely to be an incorrect mapping at that location:

@ZCostello
Copy link

ZCostello commented Apr 4, 2021

I have 10 build errors using Gitpod (before making any changes), so I'll have to see what I can do about about that first...

However, I suspect it may be as simple as adding GDK_KP_Enter => VirtualKey.Enter to uno/src/Uno.UI.Runtime.Skia.Gtk/GTK/GtkCoreWindowExtension.Keyboard.cs (perhaps at line 230 underneath the Numpad mappings), as I'm not sure the Numpad Enter key was mapped at all; thanks for the heads-up with the link!

That would fit with the mappings found in:
https://github.com/tindzk/GTK/blob/1f19269ec57609a0c23c38fefa6cd8a4917ede8b/gdk/gdkkeysyms.h#L62

Apologies for just typing things out, but I've put it in case anyone else wants to quickly try and see if it works. Otherwise I'll try it out when I get on my Windows machine.

@jeromelaban
Copy link
Member Author

Thanks for the update. Indeed GitPod should be working but for some reason build errors are not reported properly, we'll make some adjustments for that.

@MartinZikmund MartinZikmund added area/eu difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Jun 3, 2021
@lukeblevins lukeblevins self-assigned this Jul 5, 2021
@lukeblevins
Copy link
Contributor

lukeblevins commented Jul 5, 2021

@ZCostello Are you still able to reproduce this one? I tested on the latest Skia GTK from within WSL and it seems like the enter key on my keyboard's number pad is detected as Gdk.Key.Return which already correctly maps to VirtualKey.Enter.

If someone else can repro this bug, I'll open a PR which maps Gdk.Key.KP_Enter to VirtualKey.Enter.

@lukeblevins
Copy link
Contributor

Never mind. It appears this still isn't working when testing in a VM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Something isn't working project/input ⌨️ Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants