mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: sven kissner <sven.kissner@consistencies.net>
Cc: Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org
Subject: Re: logitech cordless desktop deluxe optical keyboard issues
Date: Sun, 11 Jan 2004 17:32:39 +0100	[thread overview]
Message-ID: <20040111163239.GA1955@win.tue.nl> (raw)
In-Reply-To: <200401111705.30788.sven.kissner@consistencies.net>

On Sun, Jan 11, 2004 at 05:05:06PM +0100, sven kissner wrote:

> sure but it's not working:

> # setkeycodes 91 120
> setkeycode: code outside bounds

Hm, yes. What about this version?

-------- sk.c -------
/*
 * call: sk scancode keycode
 *  (where scancode is given in hexadecimal, and keycode in decimal)
 */
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/kd.h>

int
main(int argc, char **argv) {
        struct kbkeycode a;
        char *ep;

        if (argc != 3) {
                fprintf(stderr, "Call: sk scancode keycode\n");
                exit(1);
        }

        a.scancode = strtol(argv[1], &ep, 16);
        a.keycode = atoi(argv[2]);

        if (ioctl(0, KDSETKEYCODE, &a)) {
                perror("KDSETKEYCODE");
                fprintf(stderr, "failed to set scancode 0x%x to keycode %d\n",
                        a.scancode, a.keycode);
                exit(1);
        }

        return 0;
}


  reply	other threads:[~2004-01-11 16:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-11 13:58 Andries.Brouwer
2004-01-11 16:05 ` sven kissner
2004-01-11 16:32   ` Andries Brouwer [this message]
2004-01-11 18:37     ` sven kissner
  -- strict thread matches above, loose matches on Subject: below --
2004-01-11 19:03 Andries.Brouwer
2004-01-11 19:35 ` sven kissner
2004-01-11 19:46   ` Andries Brouwer
2004-01-22 22:49     ` sven kissner
2004-01-11  4:05 Andries.Brouwer
2004-01-11  8:27 ` sven kissner
2004-01-11  0:28 Andries.Brouwer
2004-01-11  1:53 ` logitech cordless desktop deluxe optical keyboard issues sven kissner
2004-01-10 21:30 sven kissner

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=20040111163239.GA1955@win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sven.kissner@consistencies.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®