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

per user keyboard state #1716

Open
totaam opened this issue Dec 6, 2017 · 9 comments
Open

per user keyboard state #1716

totaam opened this issue Dec 6, 2017 · 9 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 6, 2017

Issue migrated from trac ticket # 1716

component: keyboard | priority: critical

2017-12-06 10:47:29: antoine created the issue


The server has a single instance of the keyboard state for all users connected, see #1373, but some of the attributes should be per-client (ie: "layout-groups", see r17573) to support better key mapping with more exotic layouts.

@totaam
Copy link
Collaborator Author

totaam commented Sep 23, 2018

2018-09-23 06:34:56: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Sep 23, 2018

2018-09-23 06:34:56: antoine commented


See also #1027

@totaam
Copy link
Collaborator Author

totaam commented Nov 29, 2018

2018-11-29 08:01:47: antoine commented


Could fix #2030.

@totaam
Copy link
Collaborator Author

totaam commented Nov 30, 2018

2018-11-30 15:21:56: antoine changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Nov 30, 2018

2018-11-30 15:21:56: antoine commented


We can't control-c from the secondary client unless it uses the same modifier keys, the server log shows:

make_keymask_match: ignored as keynames_for_mod not assigned yet

@totaam
Copy link
Collaborator Author

totaam commented Nov 30, 2018

2018-11-30 16:59:04: antoine commented


r21174 fixes the ignored as keynames_for_mod not assigned yet problem without splitting the keyboard class.
This is probably too intrusive and risky to be backported.

The server keyboard object is actually already instantiated for every client in the input servers' parse_hello method: we call get_keyboard_config which returns an x11 KeyboardConfig object for x11 servers.

  • some attributes need to be shared: keys_pressed is shared and passed in (a bit of a hack too).
  • some attributes are definitely per-client: keycode_translation, xkbmap_mod_nuisance and xkbmap_mod_pointermissing, etc..
  • for others, it is less clear: xkbmap_layout, xkbmap_variant and friends are currently only set by the first client, but we could consider merging the data from multiple clients so that all layouts are supported..

@totaam
Copy link
Collaborator Author

totaam commented Dec 6, 2018

2018-12-06 00:55:18: antoine commented


r21178 moves the "keyboard-sync" flag to the per-user keyboard configuration.

Still TODO:

  • set_keyboard_layout_group - maybe this belongs elsewhere?
  • keys_pressed unshare it? keep a per user version?
  • owner attribute belongs elsewhere..

@totaam
Copy link
Collaborator Author

totaam commented Mar 8, 2019

2019-03-08 04:33:19: antoine commented


Can be dealt with as part of #1942

@totaam
Copy link
Collaborator Author

totaam commented Feb 12, 2020

2020-02-12 05:11:27: antoine commented


See also #1172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant