LUKS improvements
Two things are changed in this PR:
- the hal layer does not trigger recovery on left shift (which is often used for LUKS entry)
- the LUKS password is no longer echo'd
- this change is kind of up for debate, because on smartphones I get why it's there, but I still don't think the echo is a great idea
- ideally someone would implement a "show/hide" button that'd
set_pwd_modetrue/false
Notes:
- hal layer not acting on lshift doesn't change the outcome it seems, the LUKS password entry still disappears and only the boot log is visible with no further indication of what's happening (as far as I can tell) and it requiring a forced power cycle and I have no idea why
- setting the echo time to 0 will still trigger the animation in lvgui, which means that the character is visible until the code catches up which is not always instant. Fixing this likely requires an if for animation related code in lvgui to call handlers immediately, or ideally an option to just not echo the keys at all, not even for a frame
Hi! :wave:
Interesting changes to an interesting part of the project.
~~Which makes me interested in knowing: how are you using the Mobile NixOS stage-1? I'm mostly curious, but also because I don't know how many people are actively using it, and with LUKS, other than me.~~ Got my answer in a linked issue: #689, on a lenovo-krane.
(I'll have some other comments, but at first glance while it might be nitty, I think the overall sentiment and idea behind the PR is acceptable.)
(Ignore the broken CI, it's broken, it's known. It's being fixed.)
@samueldr well, I did not expect that much of a response on a draft PR ^^
tbh I mostly created the draft PR so that I could pull it via the refs/pull/776/merge git ref on my mirror of the repo (so I could keep the base url from changing).
Edit: thank you nonetheless, the input is much appreciated.
On all accounts I agree with you on the echo topic, hiding any input from physical devices directly seems like a good middle ground. For me it's primarily that I wouldn't want anyone to be able to determine my password just by looking, which on a smartphone I'd ultimately solve by hiding it as good as possible when entering the code, but on a tablet with physical keyboard that's a bit more difficult (also having to type the uppercase characters using the touchscreen kinda defeats the purpose). So hiding physical keyboard input would solve my primary issue. For comparison (IIRC) Sailfish OS' regular pin entry has the same kind of hiding animation, however the LUKS unlock does not echo anything (though that may also be because the entire UI is a "lite" version of sorts before the unlock), which seems pretty reasonable to me on a phone. phosh doesn't seem to echo on pin entry either, regardless of input source, but that could be a setting of mine.
In respects to the shift issue; I have looked around both this and the lvgui repo and I just can't seem to find anything related to the shift key other than this, but given that it may not be referenced as such, or that it's due to it literally missing from a table, I may have missed the actual source. I'll see if I can get some more useful output from the serial console when it happens.
That said, I'll be largely absent from the FOSS spaces for about six weeks, so this draft PR may or may not go anywhere on my behalf. Should anyone else feel like picking up either issue, I'd be grateful.