Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
New package: auto lock the attached keyboard when flipped behind tablet #565
base: master
Are you sure you want to change the base?
New package: auto lock the attached keyboard when flipped behind tablet #565
Changes from 1 commit
6203155
7a8f773
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to use logind for this? iirc it has an option to handle lid switch events, and that way you don't need to add an extra dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to dig up my research, but from what I read the systemd login interface only lets you choose from a predefined list of behaviors – screen off, suspend, shutdown, etc. – and there's theoretically a way to redefine those behaviors (suspend.target, etc.) but I didn't really think that was appropriate (anything more than screen off, e.g. suspend, should prevent keyboard usage anyway; and more importantly people's screens might be configured to turn off via other conditions as well), plus I didn't see an event that can turn the keyboard back on. As far as I was able to find out, ACPI is intended to be the lower level interface for more control of customization like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we had a command (let's just call it
lid-closed
for example) that detected whether the keyboard's current state is flipped shut, then we could call this script on boot with the following modification: