Page MenuHomeFreeBSD

Allow enable/disable some keyboard combinations.
ClosedPublic

Authored by ray on Sep 9 2014, 2:22 PM.
Tags
None
Referenced Files
F80194515: D747.diff
Fri, Mar 29, 2:12 AM
Unknown Object (File)
Feb 26 2024, 3:03 PM
Unknown Object (File)
Jan 30 2024, 6:47 PM
Unknown Object (File)
Jan 4 2024, 4:57 AM
Unknown Object (File)
Jan 4 2024, 3:08 AM
Unknown Object (File)
Dec 19 2023, 11:54 PM
Unknown Object (File)
Nov 13 2023, 4:06 AM
Unknown Object (File)
Oct 17 2023, 9:08 AM
Subscribers
None

Details

Summary

Add sysctls to allow enable/disable some keyboard combinations.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ray retitled this revision from to Allow enable/disable some keyboard combinations..
ray updated this object.
ray edited the test plan for this revision. (Show Details)
ray added reviewers: emaste, jhb, dumbbell.

What are these key combinations? Does it have something to do with Ctrl+Alt+Esc in syscons to break into ddb?

sys/dev/vt/vt_core.c
129

underscore not needed in description

131

"Enable debugger keyboard combination"?

500–528

strange whitespace?

What are these key combinations?

Yes, the key map converts a few combinations into halt / reboot / debugger etc. "keys" -- see halt/pdwn/debug/susp/saver/panic in kbdmap(5)

See inline comments.

Also, where are those key combinations documented? Are they configurable? If not, it may be helpful to have them in the sysctl description.

sys/dev/vt/vt_core.c
531

I know that syscons used the same call, but you may use the RB_AUTOBOOT flag instead of 0.

They are configurable by a keymap, meaning we'd need something like

"Enable key combination to enter debugger (typically Ctrl-Alt-Esc)"

(or "by default" etc.)

Yeah, I think that this description helps. For instance, I don't know the combinations for reboot/halt/poweroff :) I thought Ctrl-Alt-Del was handled by init(8) but I may be wrong and simply confuse with Linux.

Regarding the text, I like your second suggestion, "... (by default, Ctrl-Alt-Esc)".

ray edited edge metadata.

o Extend descriptions for reboot and debug.
o Use RB_AUTOBOOT.

Guys,
how is it looks now? :)

sys/dev/vt/vt_core.c
129

Same as debug case, it is combination name. so not "power off", but something like "Power-Off"

131

I like "Enable \"Enter DDB\" keyboard combination" more. If it applicable :)

500–528

Hmmm, where is it?

sys/dev/vt/vt_core.c
129

You forgot to change power_off to power off (no underscore).

What are the combinations for the two actions above?

131

So Ctrl-Alt-Delete is really the key combination for that action?

Lets look it from other point of view:
o Implement all special combinations that syscons(4) have.
o Point to kbdmap(5) for reference.

btw, anybody know where to get scancodes without making experiments? :)

dumbbell edited edge metadata.
dumbbell added inline comments.
sys/dev/vt/vt_core.c
138

Thanks, the description is way more helpful like this.

Just a minor comment: I would move the "(typically ...)" brackets after the "See kbdmap(5)" but before the final ".":

​VT_SYSCTL_INT(kbd_reboot, 1, "Enable reboot keyboard combination. "
 "See kbdmap(5) to configure (typically Ctrl-Alt-Delete).");

And don't mix single-space and double-space after a ".".

This revision is now accepted and ready to land.Sep 10 2014, 10:58 AM

Oh and no, I don't know an official list of scancodes :)

Committed as r271381.
Thank you guys!

sys/dev/vt/vt_core.c
138

ok, get it. And fixed.
Will commit it (changes not so critical to wait all reviewers :) )