lkml.org 
[lkml]   [2021]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v20] tty: Fix the keyboard led light display problem
"the keyboard led light display problem" is pretty vague.  Perhaps say
"Fix incorrect "Num Lock" LED indicator"

On Mon, Dec 13, 2021 at 02:12:44PM +0800, lianzhi chang wrote:
> Use the "ctrl+alt+Fn" key combination to switch the system from tty to
> desktop or switch the system from desktop to tty. After the switch is
> completed, it is found that the state of the keyboard lock is

Is this one of those fancy gaming keyboards with LEDs under the keys or
are we talking about Num Lock?


> +int vt_do_kdgkbledctl(unsigned int console)
> +{
> + struct kbd_struct *kb = &kbd_table[console];
> + /* This is a spot read so needs no locking */
> + switch (kb->kbdledctl) {
> + case VC_LEDCTL_ON:
> + return K_LEDCTL_ON;
> + case VC_LEDCTL_OFF:
> + return K_LEDCTL_OFF;
> + }

Extra tab.

> +}
> +

> +#define VC_LEDCTL_ON 0 /* VT can set the keyboard light */
> +#define VC_LEDCTL_OFF 1 /* Prohibit VT to set the keyboard light */

> +#define K_LEDCTL_ON 0x00
> +#define K_LEDCTL_OFF 0x01

It's weird that ON is zero and OFF one. Really, it's unfortunate that
we need a new ioctl to fix this bug...

regards,
dan carpenter

\
 
 \ /
  Last update: 2021-12-13 14:23    [W:0.356 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site