* switching consoles
@ 2000-07-14 9:29 Iain Sandoe
2000-07-14 10:24 ` Martin Costabel
0 siblings, 1 reply; 9+ messages in thread
From: Iain Sandoe @ 2000-07-14 9:29 UTC (permalink / raw)
To: linuxppc-dev
anyone know the magic keys to switch consoles on linuxppc?
<alt>-fnX doesn't work for me...
Iain.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-14 9:29 switching consoles Iain Sandoe
@ 2000-07-14 10:24 ` Martin Costabel
0 siblings, 0 replies; 9+ messages in thread
From: Martin Costabel @ 2000-07-14 10:24 UTC (permalink / raw)
To: Iain Sandoe; +Cc: linuxppc-dev
Iain Sandoe wrote:
>
> anyone know the magic keys to switch consoles on linuxppc?
> <alt>-fnX doesn't work for me...
> Iain.
Depending on your kernel, your configuration and the phase of the moon,
the <alt> key is sometimes the key labelled "alt" and sometimes the
"apple" key (aka "command"). And sometimes it is completely disabled.
In X, you use control-command-fnX, and on the i- and powerbooks you have
to press the keys in a certain order to make it work (first
control-command, then fn, then fnX, IIRC).
--
Martin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
@ 2000-07-14 17:33 Derek Homeier
2000-07-14 18:19 ` Joseph Garcia
0 siblings, 1 reply; 9+ messages in thread
From: Derek Homeier @ 2000-07-14 17:33 UTC (permalink / raw)
To: linuxppc-dev
On Fri, 14 Jul 2000 12:24:28 +0200, Martin Costabel <costabel@wanadoo.fr> wrote:
>
> Iain Sandoe wrote:
> >
> > anyone know the magic keys to switch consoles on linuxppc?
> > <alt>-fnX doesn't work for me...
> > Iain.
>
> Depending on your kernel, your configuration and the phase of the moon,
> the <alt> key is sometimes the key labelled "alt" and sometimes the
> "apple" key (aka "command"). And sometimes it is completely disabled.
>
> In X, you use control-command-fnX, and on the i- and powerbooks you have
> to press the keys in a certain order to make it work (first
> control-command, then fn, then fnX, IIRC).
>
Aah, order matters! I had some problems with that in recent kernels, too.
Generally, however, I prefer to set the primary function of the F[1-12]
keys to "Function keys" in the "Options" of the "Keyboard" Control Panel.
BTW, this seems to be reset whenever my OF variables are set back to defaults.
Does anyone know if it is possible to change this setting in OF directly?
Greetings,
Derek
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-14 17:33 Derek Homeier
@ 2000-07-14 18:19 ` Joseph Garcia
2000-07-18 20:29 ` Derek Homeier
0 siblings, 1 reply; 9+ messages in thread
From: Joseph Garcia @ 2000-07-14 18:19 UTC (permalink / raw)
To: Derek Homeier; +Cc: linuxppc-dev
Derek Homeier wrote:
> Generally, however, I prefer to set the primary function of the F[1-12]
> keys to "Function keys" in the "Options" of the "Keyboard" Control Panel.
> BTW, this seems to be reset whenever my OF variables are set back to defaults.
> Does anyone know if it is possible to change this setting in OF directly?
I suppose you could try setting it back and forth and getting a hexdump of nvram
and then diff them to find the common thread. then write an app that does it
for you.
Kinda brute force, but thats how I wrote setpramboot and got it working for my
PDQ. (http://www.execpc.com/~jpgarcia) The F[1-12] keys thing could be as
little as a single bit, right?
--
Joseph P. Garcia jpgarcia@execpc.com jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate Student Employee - Systems Programmer
University of Wisconsin - Madison UW Lidar Group
Its not about MHz, its about who's got the bigger endian.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-14 18:19 ` Joseph Garcia
@ 2000-07-18 20:29 ` Derek Homeier
2000-07-18 20:41 ` Joseph Garcia
0 siblings, 1 reply; 9+ messages in thread
From: Derek Homeier @ 2000-07-18 20:29 UTC (permalink / raw)
To: Joseph Garcia; +Cc: linuxppc-dev
On Fri, 14 Jul 2000, Joseph Garcia wrote:
> Derek Homeier wrote:
> > Generally, however, I prefer to set the primary function of the F[1-12]
> > keys to "Function keys" in the "Options" of the "Keyboard" Control Panel.
> > BTW, this seems to be reset whenever my OF variables are set back to defaults.
> > Does anyone know if it is possible to change this setting in OF directly?
>
> I suppose you could try setting it back and forth and getting a hexdump of nvram
> and then diff them to find the common thread. then write an app that does it
> for you.
>
> Kinda brute force, but thats how I wrote setpramboot and got it working for my
> PDQ. (http://www.execpc.com/~jpgarcia) The F[1-12] keys thing could be as
> little as a single bit, right?
>
You mean, writing an app that can set it in Linux? Well, would be even
slicker, actually I was only thinking about some OF command like
'setenv keyxxx yyy' to not have to fully boot into MacOS every time the
bootvars are reset. But a linux utility would really be quite useful,
unfortunately I've never played with OF settings from within Linux.
I'll have a look at your setpramboot docs, though.
Thanks,
Derek
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-18 20:29 ` Derek Homeier
@ 2000-07-18 20:41 ` Joseph Garcia
2000-07-18 21:13 ` Derek Homeier
0 siblings, 1 reply; 9+ messages in thread
From: Joseph Garcia @ 2000-07-18 20:41 UTC (permalink / raw)
To: Derek Homeier; +Cc: linuxppc-dev
Derek Homeier wrote:
> On Fri, 14 Jul 2000, Joseph Garcia wrote:
> > I suppose you could try setting it back and forth and getting a hexdump of nvram
> > and then diff them to find the common thread. then write an app that does it
> > for you.
>
> You mean, writing an app that can set it in Linux? Well, would be even
> slicker, actually I was only thinking about some OF command like
> 'setenv keyxxx yyy' to not have to fully boot into MacOS every time the
> bootvars are reset. But a linux utility would really be quite useful,
> unfortunately I've never played with OF settings from within Linux.
> I'll have a look at your setpramboot docs, though.
After writing this, i thought.. hmm. isn't that a lot more a 'trackpad' tap
like thing, rather than a OF thing? If it is stored in nvram, its probably just
read by a MacOS extention, which then sets the hardware. so its probably not as
straight forward as I thought/made it out to seem. My bad.
anyone know how this is actually done? I think a Linux app would be the
ultimate solution. trackpad is a required tool for pb users IMO, and this could
become another of those tools.
--
Joseph P. Garcia jpgarcia@execpc.com jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate Student Employee - Systems Programmer
University of Wisconsin - Madison UW Lidar Group
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-18 20:41 ` Joseph Garcia
@ 2000-07-18 21:13 ` Derek Homeier
2000-07-18 21:22 ` Joseph Garcia
0 siblings, 1 reply; 9+ messages in thread
From: Derek Homeier @ 2000-07-18 21:13 UTC (permalink / raw)
To: Joseph Garcia; +Cc: linuxppc-dev
On Tue, 18 Jul 2000, Joseph Garcia wrote:
>
> After writing this, i thought.. hmm. isn't that a lot more a 'trackpad' tap
> like thing, rather than a OF thing? If it is stored in nvram, its probably just
> read by a MacOS extention, which then sets the hardware. so its probably not as
> straight forward as I thought/made it out to seem. My bad.
>
> anyone know how this is actually done? I think a Linux app would be the
> ultimate solution. trackpad is a required tool for pb users IMO, and this could
> become another of those tools.
>
Don't know, to be honest, but the reason I came to think about this was,
that when I tested a couple of 2.2.17pre10 kernels the other week, on
a crash the boot vars were always set back to defaults, i.e. boot-device
was 'hd:,\\:tbxi', boot-command was 'mac-boot', and the F[1-12] keys were
also back to the default setting.
However, this might also be a side effect of writing evil things to the PMU,
because the crashes were all related to not being able to power on the
backlight and wake up from sleep mode. Does the PMU handle the ADB stuff as
well (think I heard so, but not positive)?
Greetings,
Derek
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-18 21:13 ` Derek Homeier
@ 2000-07-18 21:22 ` Joseph Garcia
2000-07-18 21:50 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 9+ messages in thread
From: Joseph Garcia @ 2000-07-18 21:22 UTC (permalink / raw)
To: Derek Homeier; +Cc: linuxppc-dev
Derek Homeier wrote:
> However, this might also be a side effect of writing evil things to the PMU,
> because the crashes were all related to not being able to power on the
> backlight and wake up from sleep mode. Does the PMU handle the ADB stuff as
> well (think I heard so, but not positive)?
i'd think that it would be more likely the nvram resetting. But PMU is actually
on ADB. as far as i know, all direct pmu ioctls (battery query, etc) are sent
to /dev/adb, while interpreted ioctls (like sleep) are sent to /dev/pmu, which
is why /dev/pmu features need kernel support and vary from system to system.
The noodle-scratcher in this is the fact that the keyboard's F-key setting is
maintained post-sleep, while trackpad tapping is always reset. both being ADB
devs reset upon wake, id think it would get reset. there could be something we
are missing.
--
Joseph P. Garcia jpgarcia@execpc.com jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate Student Employee - Systems Programmer
University of Wisconsin - Madison UW Lidar Group
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: switching consoles
2000-07-18 21:22 ` Joseph Garcia
@ 2000-07-18 21:50 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2000-07-18 21:50 UTC (permalink / raw)
To: Joseph Garcia, linuxppc-dev
>
>i'd think that it would be more likely the nvram resetting. But PMU is
>actually
>on ADB. as far as i know, all direct pmu ioctls (battery query, etc)
are sent
>to /dev/adb, while interpreted ioctls (like sleep) are sent to /dev/pmu,
which
>is why /dev/pmu features need kernel support and vary from system to system.
Well, in fact, it's exactly the opposite ;)
The PMU is a replacement for Cuda on older machines, and is actually a
microcontroller that, among other things, the the ADB controller of the
machine. When you send PMU commands via /dev/adb, those are passed to the
PMU driver by the ADB layer, and such commands are directly sent to the
PMU. ADB commands are, however, encapsulated in specific PMU commands.
I've done some hacking on MacOS today and found that the Fn key behaviour
can apparently be triggered by setting an ADB register of the keyboard.
If you write 0xc6 0x01 to register 1 of the keyboard, the Fx keys will be
real function keys by default and Fn will trigger the control buttons.
Write 0xc6 00 to revert the behaviour to default.
So a userland tool can be easily hacked using the trackpad tool source as
an example, you have to find the keyboard instead of the trackpad (device
with default and current address 2 should always work on PowerBook and
iBook ADB) and then do the register write of a 2 bytes message
(0xc6 0x01). I can't try this now, but if someone wants to look at it...
>The noodle-scratcher in this is the fact that the keyboard's F-key setting is
>maintained post-sleep, while trackpad tapping is always reset. both
being ADB
>devs reset upon wake, id think it would get reset. there could be
>something we
>are missing.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2000-07-18 21:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-14 9:29 switching consoles Iain Sandoe
2000-07-14 10:24 ` Martin Costabel
-- strict thread matches above, loose matches on Subject: below --
2000-07-14 17:33 Derek Homeier
2000-07-14 18:19 ` Joseph Garcia
2000-07-18 20:29 ` Derek Homeier
2000-07-18 20:41 ` Joseph Garcia
2000-07-18 21:13 ` Derek Homeier
2000-07-18 21:22 ` Joseph Garcia
2000-07-18 21:50 ` Benjamin Herrenschmidt
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).