linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-17 21:14 Iain Sandoe
  2001-04-17 22:15 ` Michel Dänzer
  2001-04-17 22:49 ` Martin Costabel
  0 siblings, 2 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-04-17 21:14 UTC (permalink / raw)
  To: linuxppc-dev


Thanks to those who gave help in getting XF4 (basically) going.

I haven't been able to try Ani's patch yet - the xfree86.org cvs server
pings - but no response yet today to cvs login :-(

ati (mach64): (G3/beige, 2.4.4-pre3)

a kludge of putting the 4.0.99.1-0f libfbdevhw.a library into the latest
code gives me ati accel.  Thanks Kaoru & Scott. (Will try Ani's proper fix
as soon as I can co the XFree86 tree).

Michel's advice to "option XkbDisable" gives partial functionality (VT
switches, server re-start).... but... with no mouse button emulation or
SysRq. (haven't tried MoL yet).

===

I may be going blind - but I can't see _any_ locale-specific mac keycode
tables in the X11R6 tree...

So the next question set is...

1/ Is there a description anywhere of the flow of keycode translation
   adb -> linux_keycodes -> X  (there isn't in linux/Documentation AFAICT).
Especially:
    where to look for the tables to edit at each stage - and
    what exists to examine the codes.

2/ the (ISO Mac Keyboard) SysRq key is no longer a single value (according
to showkey it sends two codes) but this needs to be caught earlier on (in
the kernel) - so is this supposed to be before or after the translation
adb->linux_keycodes? ... or how can I find the value to modify the match
code in the kernel?  AFAICT SysRq is not working.

3/ how does one find the keycode values for <option>-key combinations so
that the mouse_button2 & 3 keycodes can be re-assigned (it is really
irritating losing them)...  [the kernel build has this emulation enabled]

4/ Notwithstanding the PMac-specific nature of some of these questions - Is
there a HOW-to on creating a keymap (I'm happy to do one for the UK keyboard
if someone can point at the mechanism).

5/ num-lock never worked for me (even under 3.3.6 - it put the keyboard
light on but made no difference to the retured codes) I'd like to get this
fixed because some apps (like cdp) use the keypad.

any pointers appreciated and thanks again for the help so far,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18  0:06 Iain Sandoe
  2001-04-18  0:08 ` Michel Dänzer
  0 siblings, 1 reply; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18  0:06 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: linuxppc-dev


On Tue, Apr 17, 2001, Michel Dänzer wrote:
> Iain Sandoe wrote:
[..]
>> Michel's advice to "option XkbDisable" gives partial functionality (VT
>> switches, server re-start).... but... with no mouse button emulation or
>> SysRq. (haven't tried MoL yet).
>
> The latter two aren't X but kernel issues.

agreed - so how come installing a new version of X blows them away :-/
(maybe it's a co-incidence...  hmmm... did I try 2.4.4 _before_ I
upgraded... can't remember)...

AH! I know what I changed - I've left off the "Xpmac backward compatibility"
CONFIG option ... should I still use that with XF4 ?

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18  0:28 Iain Sandoe
  2001-04-18  3:40 ` Tony Mantler
  2001-04-18  4:04 ` Steven Hanley
  0 siblings, 2 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18  0:28 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: linuxppc-dev


 Michel Dänzer wrote:
> Iain Sandoe wrote:
>> On Tue, Apr 17, 2001, Michel Dänzer wrote:
>> > Iain Sandoe wrote:
>> [..]
>> >> Michel's advice to "option XkbDisable" gives partial functionality (VT
>> >> switches, server re-start).... but... with no mouse button emulation or
>> >> SysRq. (haven't tried MoL yet).
>> >
>> > The latter two aren't X but kernel issues.
>>
>> agreed - so how come installing a new version of X blows them away :-/
>> (maybe it's a co-incidence...  hmmm... did I try 2.4.4 _before_ I
>> upgraded... can't remember)...
>>
>> AH! I know what I changed - I've left off the "Xpmac backward compatibility"
>> CONFIG option ... should I still use that with XF4 ?
>
> Don't think so. The thing is XF4 doesn't do mouse button emulation, the kernel
> does that.

Yep.  But maybe it puts the emulated button presses on different keys
with/without backward compat.  I'll have a look in a minute.

The frustration is that the keycodes are listed in
/proc/sys/dev/mac_hid/mouse_buttonX_keycode - but finding out which physical
key combination relates to the numbers doesn't appear to be trivial.

>For SysRq I suspect that has to do with Linux keycodes?

Not soley/directly - I've had linux keycodes enabled (and the new input
layer) for months... (including in 2.2.x back-ported version in Ben's old
tree).

I know I'm asking dumb questions... but it's gradually beginning to make
some sense..
thanks,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18  9:03 Iain Sandoe
  2001-04-18 11:40 ` Martin Costabel
  0 siblings, 1 reply; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18  9:03 UTC (permalink / raw)
  To: Tony Mantler, michel dänzer; +Cc: linuxppc-dev


On  Wed, Apr 18, 2001, Tony Mantler wrote:
> At 7:28 PM -0500 4/17/2001, Iain Sandoe wrote:
> [...]
>>The frustration is that the keycodes are listed in
>>/proc/sys/dev/mac_hid/mouse_buttonX_keycode - but finding out which physical
>>key combination relates to the numbers doesn't appear to be trivial.
>
> I think if you enable linux keycodes on the console, then use showkeys, you
> can get the proper values to plug into those files.
>
> Bit of a PITA, but at least they'll (hopefully) always be consistant.

Well, I looked at the source and the mouse button emulation is OK (on
right-ctl, alt).  Don't quite understand when/how it moved from <alt-2,
alt-3> ;-)

====

The SysRq situation is more difficult to understand - but the code is very
readable (nice stuff from Franz) - I just need to draw myself a picture
(gave up at 3am this morning).

How about a revolution  ;-?

Could we come to a consensus about a key to use that will work for both
Laptops & desktops?

How about <Power> ?  It seems to send keycode 0x7f (or 0x7e on 3400)...

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18 12:03 Iain Sandoe
  2001-04-18 12:13 ` Michel Dänzer
  2001-04-18 12:24 ` Tony Mantler
  0 siblings, 2 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18 12:03 UTC (permalink / raw)
  To: Martin Costabel; +Cc: Tony Mantler, michel   dänzer, linuxppc-dev


On  Wed, Apr 18, 2001,  Martin Costabel wrote:
>> The SysRq situation is more difficult to understand - but the code is very
>> readable (nice stuff from Franz) - I just need to draw myself a picture
>> (gave up at 3am this morning).
>>
>> How about a revolution  ;-?
>>
>> Could we come to a consensus about a key to use that will work for both
>> Laptops & desktops?
>>
>> How about <Power> ?  It seems to send keycode 0x7f (or 0x7e on 3400)...
>
> Very good idea. Except that it is already hijacked by xmon, IIUC. Maybe
> one could make the use of SysRq and of xmon mutually exclusive :-)

xmon uses <CMD aka pretzel>-power which causes an NMI - this is a hardware
thing AFAIK and can't be altered.

What I'm suggesting is <power> as a modifier (which is basically what SysRq
is)  so SysRq sequences would be like:

<power>-k  (SAK) ;  <power>-s (emergency sync). etc. etc.

<power> has the right "feel" to it (i.e. "don't touch unless you know what
you're doing").

I don't think it should interfere with the use of <CMD>-power for xmon
interrupt - MacOS manages to use it for NMI for MacsBug and <power> for
triggering a shutdown dialogue...

Although, I suppose from a User's POV - we might want (one day) to trigger a
shutdown dialogue as well ... ho hum... although a well-designed dialogue
could include the SysRq actions (which are emergency stuff) as options.

I guess we could use <CNTL>-power as the SysRq modifier - but it starts to
become a little unwieldy - because you need to hold down three keys to get
the SysRq action (well, you do now as it happens)...

so, perhaps, <CNTL>-<Power>-k etc.

thoughts?

Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18 12:44 Iain Sandoe
  2001-04-18 13:06 ` Tony Mantler
  2001-04-18 13:39 ` Gabriel Paubert
  0 siblings, 2 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18 12:44 UTC (permalink / raw)
  To: Tony Mantler, martin costabel; +Cc: michel   dänzer, linuxppc-dev


>>I guess we could use <CNTL>-power as the SysRq modifier - but it starts to
>>become a little unwieldy - because you need to hold down three keys to get
>>the SysRq action (well, you do now as it happens)...
>>
>>so, perhaps, <CNTL>-<Power>-k etc.
>>
>>thoughts?
>
> On my Apple Adjustable keyboard, control and power are about as far away
> from eachother as you can get and still be on the same keyboard. Not
> exactly 2-of-3-key-combo material. I don't have very small hands, but even
> on my AppleDesign, it's a bit of a stretch.

yeah, on mine too - which is why I was originally attracted to just <power>
as the modifier.

> Also, what happens if someone wants to hook up a PC USB keyboard to their
> mac? Obviously not generating an NMI is a given, but no access to SAK is
> avoidable.

Apparently, some Apple keyboards don't have a <power> key either.

Anyway the SysRq key for USB must be handled somewhere else - I'm looking at
the mac_hid/adb/mac_keyb code which is specific to adb-based machines IIUC.

>(Also can't forget non-mac PPCs)

Which must handle it in their hid section... depending on whether they have
serial or USB (or something special).

Ben just mailed me a much better suggestion:

"Pass the SysRq combination in as a kernel argument".

This would allow those with SysRQ keys (e.g. ISO/ANSI kbds) to use it, power
books could have something that actually exists etc. etc.

It would also mean that users could be supported with a "HOW-to" instead of
"look at the code & rebuild the kernel"...

A bit more wide-reaching than just changing a value somewhere - but probably
worth it - since this discussion comes up every few months ;-)

I'll have a (wider) look at what's needed later on...
ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-18 13:16 Iain Sandoe
  2001-04-18 13:23 ` Tony Mantler
  2001-04-18 15:18 ` Michel Dänzer
  0 siblings, 2 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-04-18 13:16 UTC (permalink / raw)
  To: Tony Mantler, martin costabel; +Cc: michel   dänzer, linuxppc-dev



>>Anyway the SysRq key for USB must be handled somewhere else - I'm looking at
>>the mac_hid/adb/mac_keyb code which is specific to adb-based machines IIUC.
>
> Ah, ok. Wasn't sure about that.

duh... neither am I ;-) ... but I'll check later.

>
> [...]
>>Ben just mailed me a much better suggestion:
>>
>>"Pass the SysRq combination in as a kernel argument".
>>
>>This would allow those with SysRQ keys (e.g. ISO/ANSI kbds) to use it, power
>>books could have something that actually exists etc. etc.
> [...]
>
> Very nice idea.
>
> ...hopefully defaulted to the standard Alt-f13/printscreen/sysrq-key in the
> absense of the kernel commandline.

what about defaulting to <cntl>-<power> if CONFIG_POWERBOOK is set on the
kernel build?
- the power key is not too far from cntl on newer PowerBook keyboards -
anyone know about older ones?
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: XF4, SysRq, VT, mouse buttons, Keymaps and all that
@ 2001-04-19 14:36 Iain Sandoe
  2001-04-19 19:32 ` Martin Costabel
  0 siblings, 1 reply; 26+ messages in thread
From: Iain Sandoe @ 2001-04-19 14:36 UTC (permalink / raw)
  To: Franz Sirl; +Cc: linuxppc-dev


Hi Franz,

copied to the list - since I think I've resolved the issues now ;-)

Franz wrote:
>I wrote:
>> I've figured out the mouse key emulation, and VT switches (by using Option
>> XkbDisable) - but I can't figure out where SysRq has ended up... and anyway
>> the idea was to see if there's a way of dealing with it so that Laptops can
>> use it too...
>
> Well, just try to setup your configuration files correctly. See the excerpt
> from my XF86Config-4 below. VT switches happen with alt(option)-ctrl-Fx if
> configured correctly.

OK.  What's happened is that the VT combination has shifted from
<CMD>-<CNTL>-Fx to <ALT>-<CNTL>-Fx ... all OK now.  (the config was correct)

[...]

>> For use of >4.0.99.x should I have CONFIG_ADB_KEYCODE disabled?
>
> For maximum compatibility options to be active you need:
>
> CONFIG_INPUT_ADBHID=y
> CONFIG_MAC_ADBKEYCODES=y
> CONFIG_MAC_EMUMOUSEBTN=y

This is what I've had (or the equivalent) since the input layer back-port to
2.2.x...

and Option "XkbModel" "macintosh"

> This will give you all the /proc entries.

yep. it does.

>> the SysRq needs to be quite low-level to be a fairly guaranteed way of
>> doing 'emergency' syncs and so on ... I'm assuming it's done individually
>> for each of the possible hid input sources.
>
> But is it enabled at all? Check /proc/sys/kernel/sysrq.

OK.  It isn't by default (which was catching me out)

Shouldn't it be enabled by default if the kernel is built CONFIG_SYSRQ?

Additionally, like VT-switching, the modifier key appears to have changed to
<ALT> from <CMD>...

SysRq doesn't appear to have _exactly_ the same behaviour as before (but
this may be a consequence of the change of Xserver - no longer using
fbdevhw).

The SysRq messages no longer break through onto the screen (I did get them
on VT-1 at one point - but couldn't reproduce it).

- and once you've got into SysRq mode it appears to be 'sticky' - i.e.
commands accepted with a single keypress until you do SysRq again.  Hmmm.
It might have been like that before - and I never noticed - because I always
did three-key-presses.

----

The issue of a "GoodWay" (tm) to support Laptops with SysRq remains - I'd
like to be able to use it on my Lombard...

====

So, now the correct place to make changes to get the right symbols out for
~/` ±/§ and so on is in  /usr/X11R6/..../xkb/symbols/gb - I assume.

====

I guess that I must have missed a place to look for the changes that
occurred to the modifier keys etc.... perhaps Kaoru should add this
information to his ftp directory.  If people who monitor the -dev list don't
know, what chance have Users got ;-?

====

anyway, thanks for the help - I'm now the proud owner of a nicely
accelerated, non-flickering, ati mach64 XF4 installation.... *and* know
which keys to press ;-))

next time I have some time - I'll do the Lombard & the 9600 (imstt could be
amusing)...

BTW: It runs MoL (almost fine) too.

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2001-04-21 22:59 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-17 21:14 XF4, SysRq, VT, mouse buttons, Keymaps and all that Iain Sandoe
2001-04-17 22:15 ` Michel Dänzer
2001-04-17 22:49 ` Martin Costabel
  -- strict thread matches above, loose matches on Subject: below --
2001-04-18  0:06 Iain Sandoe
2001-04-18  0:08 ` Michel Dänzer
2001-04-18  0:28 Iain Sandoe
2001-04-18  3:40 ` Tony Mantler
2001-04-18  4:04 ` Steven Hanley
2001-04-18  9:03 Iain Sandoe
2001-04-18 11:40 ` Martin Costabel
2001-04-18 12:03 Iain Sandoe
2001-04-18 12:13 ` Michel Dänzer
2001-04-18 12:24 ` Tony Mantler
2001-04-18 12:44 Iain Sandoe
2001-04-18 13:06 ` Tony Mantler
2001-04-18 13:39 ` Gabriel Paubert
2001-04-18 14:54   ` Franz Sirl
2001-04-18 16:10     ` Gabriel Paubert
2001-04-18 13:16 Iain Sandoe
2001-04-18 13:23 ` Tony Mantler
2001-04-18 15:18 ` Michel Dänzer
2001-04-19 14:36 Iain Sandoe
2001-04-19 19:32 ` Martin Costabel
2001-04-20 10:12   ` Franz Sirl
2001-04-21 22:45     ` Martin Costabel
2001-04-21 22:59       ` Michel Dänzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).