public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Unisys pc keyboard new keys patch, kernel 2.4.3
@ 2001-04-13 13:02 Jan Dvorak
  2001-04-13 22:21 ` Guest section DW
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Dvorak @ 2001-04-13 13:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

Hi,

i recently met with a new (Unisys) keyboard, which have (among 'normal'
windows keys) 3 more keys on top of arrows, labeled by pictures as
halfsun, halfmoon, and power switch. Following patch adds 'support' for them
(or at least gets rid of 'unknown scancode' messages), but beacuse i am
new to kernl programming, i don't know if it is the right approach. If it'll
be OK, it should apply to drivers/char/q40_keyb.c, drivers/sbus/char/sunkbd.c
and drivers/sbus/char/pcikbd.c as well. I found no maintainer of charaacter
devices/keyboards/input, so i am posting here.

Jan Dvorak <johnydog@go.cz>


[-- Attachment #2: unikey.patch --]
[-- Type: text/plain, Size: 1245 bytes --]

--- linux/drivers/char/pc_keyb.c.orig	Mon Apr  9 13:58:31 2001
+++ linux/drivers/char/pc_keyb.c	Fri Apr 13 13:34:05 2001
@@ -224,6 +224,15 @@
 #define E0_MSRW	126
 #define E0_MSTM	127
 
+/*
+ * Another new microsoft (Unikey) keyboard seems to have just another
+ * three keys: e0 63 (half- or rising- sun), e0 5f (halfmoon) 
+ * and e0 5e (power button?)
+ */
+#define E0_MSPOWER	128
+#define E0_MSHALFMOON	129
+#define E0_MSHALFSUN	130
+
 static unsigned char e0_keys[128] = {
   0, 0, 0, 0, 0, 0, 0, 0,			      /* 0x00-0x07 */
   0, 0, 0, 0, 0, 0, 0, 0,			      /* 0x08-0x0f */
@@ -236,8 +245,8 @@
   E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME,	      /* 0x40-0x47 */
   E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */
   E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0,	      /* 0x50-0x57 */
-  0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0,	      /* 0x58-0x5f */
-  0, 0, 0, 0, 0, 0, 0, 0,			      /* 0x60-0x67 */
+  0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, E0_MSPOWER, E0_MSHALFMOON,/* 0x58-0x5f */
+  0, 0, 0, E0_MSHALFSUN, 0, 0, 0, 0,		      /* 0x60-0x67 */
   0, 0, 0, 0, 0, 0, 0, E0_MACRO,		      /* 0x68-0x6f */
   0, 0, 0, 0, 0, 0, 0, 0,			      /* 0x70-0x77 */
   0, 0, 0, 0, 0, 0, 0, 0			      /* 0x78-0x7f */

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH] Unisys pc keyboard new keys patch, kernel 2.4.3
@ 2001-04-15 16:40 James Simmons
  0 siblings, 0 replies; 16+ messages in thread
From: James Simmons @ 2001-04-15 16:40 UTC (permalink / raw)
  To: Linux Kernel Mailing List


> [One of the things for 2.5 is 15- or 31-bit keycodes.
> The 7-bits we have today do no longer suffice. I have a 132-key keyboard.]

Or for 2.5.X you could use EVIOCGKEYCODE or EVIOCSKEYCODE using
/dev/eventX. Also the input api supports up to 220 different keys and
could support up to 255. If you app needs to use a large keycode space
then use this instead. Its better to use this interface especially
for embedded systems that have only a serial console, but sometimes
we need to use a regular keyboard. Consider for example a hand held iPAQ.
Usually their is no keyboard attached. Here you have a graphical interface
(using framebuffer) and a touch screen. So here I like to have a kernel
that uses fbdev without the VT console system and input drivers to
interface with the device. Debugging can be done by the serial console.
If I attach a keyboard I like to be able to use it without having to have
a console system needing to be built in. Remember every byte of space
counts. Getting keycode via the console layer should eventually be
replaced by this approach.

MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.

James Simmons  [jsimmons@linux-fbdev.org]               ____/|
fbdev/console/gfx developer                             \ o.O|
http://www.linux-fbdev.org                               =(_)=
http://linuxgfx.sourceforge.net                            U
http://linuxconsole.sourceforge.net


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH] Unisys pc keyboard new keys patch, kernel 2.4.3
@ 2001-04-17 16:55 James Simmons
  2001-04-17 17:16 ` Alan Cox
  0 siblings, 1 reply; 16+ messages in thread
From: James Simmons @ 2001-04-17 16:55 UTC (permalink / raw)
  To: Alan Cox
  Cc: Albert D. Cahalan, Guest section DW, Eric W. Biederman,
	H. Peter Anvin, Linux Kernel Mailing List


>> Yes, but they could be. Changing the Linux keycodes is a major
>> break with compatibility. If the Linux keycodes are to be changed,
>> then they ought to be become something that would allow XFree86
>> to become keyboard-independent. Why invent yet another encoding?
>
>You dont need to break compatibility. We have cooked, raw, semi-raw type
>modes for keyboard right now. We just need to add semi-raw-extended and
>raw-extended

      Why? X was designed with the idea of a input device core. Keyboards
and mice are just a extenstion of this. Now that linux has a universal
input api (/dev/input/eventX) we can wrapper X around this. I'm working on
this for embedded devices. It just plain stupid to have VT support on
something like a hand held iPAQ which doesn't usually have a keyboard
attached. Also having fbcon built in for these devices just takes up
valuable space since without a keybaord it pretty much is a waste. I
rather have fbdev by itself with input support with only serial console
support. Yes several X apps expect keybaord input coming in. Well we just
don't support those apps on a handheld device. X apps that can work
completely with a mouse would work perfectly on these embedded devices
and would be installed. Since X has this nice clean design I really like
to see XFree86 also use this approach. 
       


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH] Unisys pc keyboard new keys patch, kernel 2.4.3
@ 2001-04-17 17:51 James Simmons
  0 siblings, 0 replies; 16+ messages in thread
From: James Simmons @ 2001-04-17 17:51 UTC (permalink / raw)
  To: Alan Cox
  Cc: Albert D. Cahalan, Guest section DW, Eric W. Biederman,
	H. Peter Anvin, Linux Kernel Mailing List


>> this for embedded devices. It just plain stupid to have VT support on
>> something like a hand held iPAQ which doesn't usually have a keyboard
>> attached. Also having fbcon built in for these devices just takes up
>
>It makes plenty of sence to have support for virtual terminals on the
>ipaq. I agree you want it modular so you can load the vt support when you
>need it.

Only if you have the attachable keyboard. Other embedded devices
completely lack a keyboard. They do however have some graphical output.
If you want X on them then using the /dev/input/event interface is the way
to go. I like to see that for the desktop as well :-)  


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2001-04-17 17:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-13 13:02 [PATCH] Unisys pc keyboard new keys patch, kernel 2.4.3 Jan Dvorak
2001-04-13 22:21 ` Guest section DW
2001-04-13 23:53   ` H. Peter Anvin
2001-04-16  6:29     ` Eric W. Biederman
2001-04-16 17:41       ` Guest section DW
2001-04-16 19:52         ` Albert D. Cahalan
2001-04-16 23:53           ` Alan Cox
2001-04-17  5:30             ` Eric W. Biederman
2001-04-16  6:54     ` Albert D. Cahalan
2001-04-16  6:59       ` H. Peter Anvin
2001-04-14 18:12   ` Jan Dvorak
2001-04-15  6:29     ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2001-04-15 16:40 James Simmons
2001-04-17 16:55 James Simmons
2001-04-17 17:16 ` Alan Cox
2001-04-17 17:51 James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox