[ tvtime-Patches-3515744 ] tvtime should resolve keysyms based on current layout/group
SourceForge.net <[email protected]> Sat, 07 Apr 2012 12:10:55 -0700
| Newsgroups | gmane.comp.video.tvtime.devel |
|---|---|
| Message-ID | <[email protected]> |
Patches item #3515744, was opened at 2012-04-07 12:10 Message generated for change (Tracker Item Submitted) made by selliott4 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=506989&aid=3515744&group_id=64301 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: Patch against released tvtime Status: Open Resolution: None Priority: 5 Private: No Submitted By: Steven Elliott (selliott4) Assigned to: Billy Biggs (vektor) Summary: tvtime should resolve keysyms based on current layout/group Initial Comment: I have a Linux system with multiple keyboard layouts/groups configured through the GNOME interface (not using setxkbmap via the command line) so that I'm able to switch between them. In my case dvorak is the primary default group, which means it's group 0 in the X11 API, and the second group is US, which means it's group 1 in the X11 API. When I switch from my primary default group (dvorak) to my secondary group (US) tvtime continues interpret keystrokes as if my primary default group was still in effect. In tvtime XKeycodeToKeysym() is used which seems to always use group 0 to resolve keysyms. Although there is the newer XkbKeycodeToKeysym() API that allows the group number to be passed, there is not, to me at least, an obvious way of finding the current group without working with X11 extensions. I've found that XLookupString() resolves keysyms using the current group. It also handles modifiers such as shift, so it simplifies the code a bit. My patch passes in "keyStr" to get the key as a string which is not used. It seems to work to pass in NULL, but that's not documented. I went through a few keystrokes and it seems to work for me for both my primary and secondary groups. It's possible that the current behavior with regard to groups is intentional. A few years ago it seemed that it was common for applications, at least when modifiers such as ALT were pressed, to behave like tvtime does now forcing me to use setxkbmap to get the behavior I'm aiming for (for only the current group to be considered regardless of modifiers or other reasons). But currently almost all applications seem to only consider the current group, at least in GNOME. The patch is against released tvtime 1.0.2 on my Fedora 16 system, but I checked that the patch applies cleanly to latest CVS. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=506989&aid=3515744&group_id=64301 ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2