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

Setting a keyboard layout as soon, as simply as possible when booting live e.g. from the .iso #68

Closed
grahamperrin opened this issue Dec 31, 2020 · 8 comments

Comments

@grahamperrin
Copy link
Contributor

Pending resolution of helloSystem/hello#8 and/or helloSystem/hello#36

Re: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-introduction.html#idp56816120

With Escape presenting the loader prompt: can a layout be set at this point?

If so, what's the syntax?


If not, I guess it'll be:

  1. unset boot_mute
  2. boot -s
  3. mount -uw /
  4. ee /etc/rc.conf
  5. exit

(I'm most familiar with non-Mac keymap="uk.kbd" set in the rc.conf on my non-helloSystem FreeBSD-CURRENT.)

@probonopd
Copy link
Member

probonopd commented Dec 31, 2020

can a layout be set at this point?
If so, what's the syntax?

I do not know. Can you please research this using FreeBSD resources? I do know that we can already read EFI variables there. So if we could already set the keyboard layout in the bootloader, that would be really nice.

@grahamperrin
Copy link
Contributor Author

A real struggle for me. I could not even figure out how to set/change the layout (or should I say mapping?) after startup:

image

In essence: I want Alt and Control to be not transposed; for Control-X to work as expected in nano, and so on.

After a few mistakes I added keymap="uk.kbd" to /etc/rc.conf then restarted. Realised another mistake by me: the configuration is not persistent. My next attempt:

  1. boot
  2. Escape
  3. boot -s -v Return
  4. Return

– I'm at the single user mode command prompt (imagining a change to a configuration file before exiting to multi-user mode) but there's:

  • no nano
  • no ee

– and critically, vi does not work.

@probonopd
Copy link
Member

How could one do this?

Isn't -s supposed to be barebones? E.g., as far as I remember also on the Mac the keyboard layout is plain English there even if you have selected another one...

@probonopd
Copy link
Member

Relevant piece of code:
https://github.com/helloSystem/ISO/blob/experimental/overlays/uzip/localize/files/usr/local/sbin/localize

@grahamperrin
Copy link
Contributor Author

grahamperrin commented Jan 2, 2021

Thanks. From the screenshot at #75 (comment) now I guess that it's wrong to aim for /etc/rc.conf

print("setxkbmap needs to be run from within a graphical user session")
looks promising. So, for now:

image

– and I'll aim to get the mac variant/model conflicting stuff out of my way after the desktop environment appears.

@grahamperrin
Copy link
Contributor Author

Success :-D with late settings (after appearance of the desktop environment).

Essentially

setxkbmap -model pc101 -layout gb,us -option compose:ralt

image

Observations

From a few minutes' use, I see just one problem with mappings:

  • the runner should respond to Alt-F2

– it does not. It responds to Control-F2:

image

Observed after the recording: Q in terminal in response to Alt-F2

2021-01-02 Q in terminal in response to Alt-F2

I'll take a look at this later.


Screen recording: https://photos.app.goo.gl/SYmjiXQpqd4PhinRA ▶ first recording

  • Shift was invisible because I forgot to use option --vis-shift with screenkey
  • ignore most of the tail end of the recording; I stupidly tried to run aspell.

@probonopd
Copy link
Member

probonopd commented Jan 2, 2021

I see just one problem with mappings:

It is currently configured to do this (because Ctrl and Alt are swapped):

We should probably bring all those things into the Shortcut Keys application so that they can easily be changed by the user (and are discoverable).

@grahamperrin
Copy link
Contributor Author

https://hellosystem.github.io/docs/developer/ux-guidelines.html#avoiding-configuration-options

KDE Plasma is recommended as an alternative for users who wish to configure and customize every aspect of the system.

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

No branches or pull requests

2 participants