Date: Wed, 25 Feb 2009 00:22:48 +0100 From: Michel Talon <talon@lpthe.jussieu.fr> To: freebsd-questions@freebsd.org Subject: Re: Determining scancodes for obscure keyboard to modify keymap Message-ID: <20090224232248.GA88129@lpthe.jussieu.fr>
next in thread | raw e-mail | index | archive | help
Bill Campbell wrote: > As somebody else pointed out, xev is your friend. > > I am attaching the .Xmodmap file I use on OS X to allow the > numeric keypad on the Microsoft 4000 natural keybaord to do the > Right Thing(tm) (e.g. send numbers when using python curses). Scancodes have nothing (*) to do with keycodes. Xev will be of absolutely no help for remapping if it doesn't see the key at all, which frequently occurs with exotic keys. As Patrick said, you need to dig into the OS keyboard driver to solve the problem when working on the console. On Linux it is easier there are commands to detect and remap scancodes. Getting those keys working under X is still another problem, it may be that you have to hack the keyboard controller of the X server to do that. In other words, it is extremely inconvenient. Windows works directly with scancodes and they can be remapped in the registry, with all the problems this entails. On the other hand one can find scancode documentation on Microsoft site. (*) more precisely there is a partial mapping of scancodes to keycodes. xmodmap manages a second mapping from keycodes to symbols, as recognized by your X applications. -- Michel TALON
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090224232248.GA88129>
