LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Default keyboard LEDs
Date: Sun, 13 Jan 2008 19:50:34 -0800 [thread overview]
Message-ID: <478ADC0A.7020006@zytor.com> (raw)
In-Reply-To: <20080114005219.GA4296@implementation>
Samuel Thibault wrote:
> In many cases, one prefers to have e.g. the NumLock on by default. In
> many cases, one doesn't want to have it by default, e.g. on laptops.
>
> Distributions actually have a very hard time trying to set this
> correctly after the kernel boot, and that doesn't work for new consoles
> that are created via the openvt(1) command anyway. This hence adds a
> keyboard.default_leds boot parameter that permits to configure the
> default keyboard LEDs.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> Actually, what would be perfect would be to use the configuration that
> the BIOS sets at boot by default. That is device-dependent, however.
>
It is, but it can be read out either by INT calls at initialization
time, or by reading out the byte at physical address 0x417:
--------K-M00400017--------------------------
MEM 0040h:0017h - KEYBOARD - STATUS FLAGS 1
Size: BYTE
SeeAlso: MEM 0040h:0018h,INT 16/AH=02h,MEM 0040h:0096h
Bitfields for keyboard status flags 1:
Bit(s) Description (Table M0010)
7 INSert active
6 Caps Lock active
5 Num Lock active
4 Scroll Lock active
3 either Alt pressed
2 either Ctrl pressed
1 Left Shift pressed
0 Right Shift pressed
SeeAlso: #M0011,#00587
The same information is available through INT 16h, AH=02h.
-hpa
next prev parent reply other threads:[~2008-01-14 3:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 0:52 Samuel Thibault
2008-01-14 1:40 ` Jan Engelhardt
2008-01-14 10:24 ` Samuel Thibault
2008-01-14 3:50 ` H. Peter Anvin [this message]
2008-01-14 10:27 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=478ADC0A.7020006@zytor.com \
--to=hpa@zytor.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--subject='Re: [PATCH] Default keyboard LEDs' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).