Giter VIP home page Giter VIP logo

Comments (6)

logileifs avatar logileifs commented on July 20, 2024 1

I tried a few different keyboard layouts, German, French and Icelandic, all of them have the AltGr key mapped to 65027. It seems the english layout is the only one (of those) using AltGr as 65406.

The main problem for me though is that this key (65027) gets recognized as an alphanumeric key by pynput so I cannot reliably catch it as a modifier.

@moses-palmer is this something that could be fixed? I'd be happy to make a pull request if you could maybe point me in the right direction

from pynput.

moses-palmer avatar moses-palmer commented on July 20, 2024 1

I have pushed a partial solution to fixup-xorg-altgr.

This branch simply adds a mapping from ISO_Level3_Shift to AltGr. This solution is not complete; it modifies only the listener part, so attempting to send a lone AltGr will send Mode_switch.

from pynput.

hou2zi0 avatar hou2zi0 commented on July 20, 2024 1

Hello, I may have a similar or the same issue using a German qwertz keyboard on Ubuntu 20.04; pynput 1.7.3.
altgr maps onto 65027 for me as well. Parts of the keyboard map fine (normal alphanumeric, shift+number keys), some keys seem to follow the US keyboard layout, e.g. altgr+ü yields @, altgr+'+' yields [, altgr+shift+'+' yields {, altgr+ä yields :, and so on (I attached the expected German layout).
I don't quite know where to go from this :) to me it seems like the layouts are merged somehow, so maybe the problem lies on the level of the OS ... maybe someone has any ideas.
keys

from pynput.

SpecialCharacter avatar SpecialCharacter commented on July 20, 2024

Maybe this helps a bit?
#44

from pynput.

logileifs avatar logileifs commented on July 20, 2024

@SpecialCharacter thanks for the tip but I don't think this will help since I'm not on windows and I was hoping to get a solution that would work with any keyboard layout. I am not reliably able to catch the Alt gr with any layout because it seems to be mapped to a different keycode depending on language layout

from pynput.

SpecialCharacter avatar SpecialCharacter commented on July 20, 2024

@logileifs ok, so we both are looking for a way to make pynput recognize AltGr…

from pynput.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.