public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Skip Ford <skip.ford@verizon.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>,
	Andries Brouwer <aebr@win.tue.nl>,
	linux-kernel@vger.kernel.org
Subject: Re: KDSETKEYCODE work with new input layer?
Date: Mon, 7 Oct 2002 15:39:24 +0200	[thread overview]
Message-ID: <20021007153924.A264@ucw.cz> (raw)
In-Reply-To: <200210071323.g97DNa7w001744@pool-141-150-241-241.delv.east.verizon.net>; from skip.ford@verizon.net on Mon, Oct 07, 2002 at 09:23:26AM -0400

On Mon, Oct 07, 2002 at 09:23:26AM -0400, Skip Ford wrote:
> Vojtech Pavlik wrote:
> > On Tue, Oct 01, 2002 at 06:29:55PM +0200, Andries Brouwer wrote:
> > > 
> > > In kbd-1.06. It is from May 2001, and I have been planning kbd-1.07
> > > for a while but there were no urgent changes, just more fonts and
> > > keymaps and the like. When you are done it is a good occasion for
> > > kbd-1.07.
> > 
> > Ok, here is a patch that should make it work correctly on all existing
> > kernels.
> > 
> > You may want to check that loadkeys supports keycodes over 127 (and for
> > future, over 255), too. I updated only getkeycodes/setkeycodes.
> 
> loadkeys and the kernel itself both reject attempts to set keycodes with
> a value >= NR_KEYS (128).
> 
> In kbd-1.06/src/loadkeys.y::addkey()
> 
>         if (index < 0 || index >= NR_KEYS)
> 	        lkfatal0(_("addkey called with bad index %d"), index);
> 
> And inside linux/drivers/char/vt_ioctl.c::do_kdsk_ioctl()
> 
> 	if (i >= NR_KEYS || s >= MAX_NR_KEYMAPS)
> 		return -EINVAL;	
> 
> I had to change each of those to KEY_MAX.  Both files use NR_KEYS in
> other places so I don't what the correct fix is.  I guess NR_KEYS is
> still correct for some keyboards?

Ok, I fixed it now in the kernel [#define NR_KEYS (KEY_MAX+1)].
I think the loadkeys source probably shouldn't check for the limit (as
that can change between kernels), and instead rely on the kernel
rejecting invalid values.

-- 
Vojtech Pavlik
SuSE Labs

  reply	other threads:[~2002-10-07 13:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-30 14:40 KDSETKEYCODE work with new input layer? Skip Ford
2002-10-01  9:54 ` Vojtech Pavlik
2002-10-01 12:31   ` Skip Ford
2002-10-01 13:17     ` Vojtech Pavlik
2002-10-01 15:32       ` Skip Ford
2002-10-01 15:41         ` Vojtech Pavlik
2002-10-01 15:54           ` Andries Brouwer
2002-10-01 15:55             ` Vojtech Pavlik
2002-10-01 16:29               ` Andries Brouwer
2002-10-07 12:06                 ` Vojtech Pavlik
2002-10-07 12:52                   ` Andries Brouwer
2002-10-07 13:23                   ` Skip Ford
2002-10-07 13:39                     ` Vojtech Pavlik [this message]
2002-10-01 16:49           ` Skip Ford
2002-10-01 16:51             ` Vojtech Pavlik
2002-10-01 17:41               ` Skip Ford
2002-10-01 17:39                 ` Vojtech Pavlik
2002-10-01 18:11                   ` Skip Ford
2002-10-01 18:38                     ` Vojtech Pavlik
2002-10-01 20:04                       ` Skip Ford
2002-10-01 20:53                         ` Vojtech Pavlik

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=20021007153924.A264@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=aebr@win.tue.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skip.ford@verizon.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