Jip-Hop / sedunlocksrv-pba

Conveniently unlock your Self Encrypting Drive on startup (via HTTPS) without the need to attach monitor and keyboard
GNU General Public License v3.0
37 stars 8 forks source link

Allow using/setting different keyboard mappings for keyboard input #13

Closed kennethso168 closed 4 months ago

kennethso168 commented 1 year ago

This is a continuation of the discussion on #9

There are two ways of doing this:

  1. The user sets the keymap when running the build script, only that keymap will be put into the preboot image and the image will be configured to use that keymap only.
  2. Put all keymaps into the preboot image and allow user to select a keymap at runtime

The kmaps.tcz package is only 140.0K large so I think the first way should be viable (and it is better as it allows the user to enter the correct password even if he doesn't have the correct keyboard on hand). And for this we need to think of a way to let user change the keymap at runtime.

We can make reference to SystemRescueCD's way to letting user change the keymap:

https://github.com/Jip-Hop/sedunlocksrv-pba/assets/5262487/47df98fd-1422-4564-b406-86250a29a651

SystemRescueCD implements this using the dialog binary. I have tried rebuilding the image while adding kmaps.tcz and dialog.tcz. The resultant image is the same size as before.

kapitainsky commented 1 year ago

If I could give my one pence of worth comment...

I think the ideal solution would be to support both 1) and 2) - by build flag or env variable user could decide which way to go when building image.

Now ideal is not always possible or it is too much worth of effort. But still would be "wish solution":)

At the same time given that both the PBA and rescue images use the us_english keyboard only maybe it is all artificial issue?

Jip-Hop commented 1 year ago

I've already experienced the issue myself of an incorrect key map making it hard/impossible to unlock my disk. Especially if the password contains special characters, e.g. dollar or euro sign. So it's not an artificial issue. Yes a combination of both (user specified default keymap at build time with possibility to change at runtime) sounds best.

korentzari commented 5 months ago

I believe it is unnecessary to allow changing the keymap on demand at each boot. I think no one will type their password in AZERTY and occasionally in QWERTY.

Jip-Hop commented 4 months ago

Closed by https://github.com/Jip-Hop/sedunlocksrv-pba/pull/30