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

Default keyboard setting unclear #7

Closed
coenvanpoelje opened this issue Jan 2, 2022 · 6 comments · Fixed by #9
Closed

Default keyboard setting unclear #7

coenvanpoelje opened this issue Jan 2, 2022 · 6 comments · Fixed by #9
Labels
UX UX-related issue

Comments

@coenvanpoelje
Copy link

Playing the Aegis game, I ran into Q-Y shortcut for Outposts. Playing a QWERTY keyboard this seemed odd to me.
image

Checking the settings menu, in the keyboard layout selection, no option is highlighted.
image
After selecting qwerty in the settings menu, it works as I am used to.

The only issue is that the current selected keyboard layout should be easier to find out.

@alexwidua
Copy link
Owner

alexwidua commented Jan 2, 2022

Hi @coenvanpoelje,
thank you for bringing this up.

You're right, the default keyboard layout is set to QWERTZ. While it's up for debate if this is good as a default, each key of the grid can be rebound by clicking on it, but I guess this isn't really clear. The options at the bottom are more popular presets that populate the grid above, but they're totally optional — this also is more implied than it is clear.

From your opinion or gut feeling, how could we make this more clear?

From the top of my head, one thing I could imagine is to transform the ambiguous preset menu into an primary segmented option menu. Here's a quick mock up — what do you think?

#7

@alexwidua alexwidua added the UX UX-related issue label Jan 2, 2022
@reneklacan
Copy link
Contributor

@alexwidua I love your proposed solution

related to default, considering QWERTY is the most popular layout overall, I think that should be the default

alternatively we can also use experimental feature to detect layout and set default based on it but support is not great https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/getLayoutMap

@coenvanpoelje
Copy link
Author

Sounds like you guys got this down, @alexwidua your solution looks great.
Perhaps, since not knowing the current set keyboard layout affects the user experience a lot.
There could be a quick light / transparent notification or watermark in-game that indicates the current setting and links the user to the settings page to set their own preference.

Detecting the actual keyboard layout can be tough, though finding the most likely default determined by I18N language could be possible if you use some form of I18N in the app.

@alexwidua
Copy link
Owner

Thank you for your input guys. The idea with the initial message asking if the settings are correct is also great.
I've dabbled with it yesterday and changed the structure of the keyboard menu to the proposed solution ☝️(not live yet),

I'm also doing some refactoring of other components -- I'll push the changes asap, I'm just super tight on time right now. I'll keep you guys posted, thanks for your help!

@jimcullenaus
Copy link
Contributor

jimcullenaus commented Jan 5, 2022

One option could be to use this API. It's not supported on Firefox or Safari yet, so you'd need it to be optional, but something like setting the default on initial load as:

if ("keyboard" in navigator) {
  let keyboardLayout = await navigator.keyboard.getLayoutMap();
  var ageOneKey = keyboardLayout.get('KeyQ');
  var ageTwoKey = keyboardLayout.get('KeyW');
  // etc.
}

Then set the variables for ageOneKey, ageTwoKey, etc. to the keyboard layout, could provide a pretty great user experience out of the box, giving users the option to customise it themselves if they prefer (or if that fails).

@alexwidua
Copy link
Owner

alexwidua commented Jan 5, 2022

Thank you for your getLayoutMap() suggestions @reneklacan @jimcullenaus
I've pushed a new version to the dev branch which implements this feature. You can view the preview here, I'll merge it tomorrow.

If the player plays for the first time, the game will ask the user if the current keyboard layout is correct (great idea, James).

@alexwidua alexwidua mentioned this issue Jan 6, 2022
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX UX-related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants