[PATCH weston 3/3] shell: turn on the num lock at startup

Giulio Camuffo giuliocamuffo at gmail.com
Sat Dec 14 14:18:59 PST 2013


It was rightly pointed out to me that on a laptop keyboard having num
lock on by default would be an annoyance, so discard this patch. I'll
probably try adding an option in weston.ini.

Giulio

2013/12/14 Giulio Camuffo <giuliocamuffo at gmail.com>:
> it seems to me having num lock on is a sensible default
> ---
>  desktop-shell/shell.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 520623f..fa77093 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -5836,6 +5836,12 @@ module_init(struct weston_compositor *ec,
>
>         shell_add_bindings(ec, shell);
>
> +       wl_list_for_each(seat, &ec->seat_list, link) {
> +               if (seat->keyboard)
> +                       weston_keyboard_set_leds(seat->keyboard,
> +                                                LED_NUM_LOCK, LED_NUM_LOCK);
> +       }
> +
>         shell_fade_init(shell);
>
>         return 0;
> --
> 1.8.5.1
>


More information about the wayland-devel mailing list