Ask a Question related to Sun Solaris, Design and Development.
-
Philip Brown #1
Re: keyboard conundrum
Alan Coopersmith <alanc@alum.calberkeley.org> wrote in message news:<bd5tvj$2omc$3@agate.berkeley.edu>...
If not using XKB, the offset is> phil+s3@bolthole.no-bots.com writes in comp.unix.solaris:
>...
> |I say this, because according to xev, the backspace key is keycode 49.
> |however, grepping through the files in the keytables dir above, there is
> |no file that maps keyboard 49 to backspace. yet, backspace actually works
> |and gives the right keysym!
>
> The files in that directory show the USB keycode value - X adds an
> offset to this to make room for the mouse buttons in the bottom of
> the keycode range returned.So in theory, if xev shows the backspace key is X keycode 49, and then> (8 - MINSCANCODE) as noted in the comments in the keytable.
since US6.kt.Z shows 42 RN XK_BackSpace, then the offset is 7
I shall give that a try. Thanks.
[huh. using that math, since xev says 'bar' aka pipe, is keycode 57,
then that means the keytable for this keyboard would need an entry for
it at 50, whereas US6 has it at 49. off-by-one, durn :-/ ]
Do you know of any precompiled, with-the-os way to probe the keyboard
to find out the "layout" value? Otherwise, if you have some source
for a util lying around, it would be nice if you posted it. I want to
know which entry for keytable.map I'm going to have to override for
this thing.
Or is the layout set only via kdmconfig, on x86? If so, where is it
stored?
I cant find where kdmconfig is getting its list of keyboards from.
oh, waitaminit. seems that I have to create
devdata/keyboards/somename.kbd
AND add an entry to devdata/iddbdir/keyboards.idb,
AND then add an entry for keytables/keytable.map
AND the copy and modify US6.kt.Z to somename.kt.Z
ugh.
Philip Brown Guest
-
Module naming conundrum
Greetings, all. I have three modules I am preparing for submission to CPAN, but I freely confess that I can't come up with decent names for them. ... -
update conundrum
Hey, I have a slight issue on my hands and don't know how to approach it. Here's my situation: I have a form which allows the user to update... -
XML Socket - Header conundrum...
I'm desperately trying to found out how to add a header to my socket message sends. I'm communicating via flash to a c++ server, and of course all... -
color conundrum
Is there any speedy way to replace either black or white in an image with another color? "Replace color" only gives shades of gray as options, and... -
Clunky Cache Code Conundrum?
I am storing all my application data in the application cache. Anytime I have a method as part of an asp.net form, I need to access the objects in... -
Alan Coopersmith #2
Re: keyboard conundrum
[email]phil.googlenews@bolthole.com[/email] (Philip Brown) writes in comp.unix.solaris:
|Do you know of any precompiled, with-the-os way to probe the keyboard
|to find out the "layout" value? Otherwise, if you have some source
|for a util lying around, it would be nice if you posted it.
/* Copyright Sun Microsystems, Inc. All rights reserved. */
#include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/kbio.h>
#include <fcntl.h>
#define dev_name "/dev/kbd"
int main()
{
int fd = open (dev_name, O_RDWR, 0);
int type; /* Type of keyboard */
int layout; /* Layout of keyboard */
if (fd < 0) {
fprintf(stderr, "Opening %s", dev_name);
return -1;
}
if (ioctl(fd, KIOCTYPE, &type) < 0) {
fprintf(stderr, "KIOCTYPE failed");
return -1;
} else {
printf("Type: %d\n", type);
}
if (ioctl(fd, KIOCLAYOUT, &layout) < 0) {
fprintf(stderr, "KIOCLAYOUT failed");
return -1;
} else {
printf("Layout: %d\n", layout);
}
return 0;
}
--
__________________________________________________ ______________________
Alan Coopersmith [email]alanc@alum.calberkeley.org[/email]
[url]http://www.CSUA.Berkeley.EDU/~alanc/[/url] aka: [email]Alan.Coopersmith@Sun.COM[/email]
Working for, but definitely not speaking for, Sun Microsystems, Inc.
Alan Coopersmith Guest
-
Philip Brown #3
Re: keyboard conundrum
On Tue, 24 Jun 2003 01:26:53 +0000 (UTC), [email]alanc@alum.calberkeley.org[/email] wrote:
great! thanks a lot. I now have a working pipe key!>[nice simple test prog to tell keyboard layout/type]
[on console, anyways. my plan to auto-remap keys in X isnt turning out
quite as well :-( ]
can you tell me how the layout number gets set for USB console keyboards,
though?
--
[url]http://www.blastwave.org/[/url] for solaris pre-packaged binaries with pkg-get
Organized by the author of pkg-get
[Trim the no-bots from my address to reply to me by email!]
S.1618 [url]http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D[/url]
[url]http://www.spamlaws.com/state/ca1.html[/url]
Philip Brown Guest
-
Juergen Keil #4
Re: keyboard conundrum
phil+s3@bolthole.no-bots.com (Philip Brown) writes:
See the /usr/lib/set_keyboard_layout shell script (on Solaris x86),> can you tell me how the layout number gets set for USB console keyboards,
> though?
which is run from /etc/rcS.d/S33keymap.sh (/etc/init.d/keymap) very
early at system startup time.
I think Sun USB keyboards define a proper "country code" in the usb
device descriptors, so set_keyboard_layout isn't needed. But the
typical PC USB keyboard doesn't and needs the set_keyboard_layout
workaround. If you connect a PC USB keyboard (with a non US keyboard
layout) to a SPARC, you'll soon notice that
/usr/lib/set_keyboard_layout from S-x86 is missing on S-SPARC :-)
Juergen Keil Guest



Reply With Quote

