Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 7043 - apple key to should be an rc.conf option
Summary: apple key to should be an rc.conf option
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Khayyam
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-26 06:33 UTC by Lapo Calamandrei
Modified: 2006-02-04 06:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lapo Calamandrei 2002-08-26 06:33:44 UTC
/bin/loadkeys -q ${KEYMAP} windowkeys >/dev/null
                           ^^^^^^^^^^

this should be an rc.conf option. On tibook you can't use a non eng locale
keyboard with this because you only have L_Alt, and R_Alt is *NEEDED*.
I usually use apple keys (sice the two keys send the same scancode :-( ) as
L_Alt and alt key as R_Alt or vice versa.
Comment 1 Mark Guertin 2002-08-26 09:40:33 UTC
I don't understand what you are getting at here...can you not just set your own
keymap for this?
Comment 2 Mark Guertin 2002-08-27 14:01:13 UTC
Can you be a bit more specific on this? what file does this get set in, which
pkg does it come from, etc...

I know from speaking with you that the windowkeys line should be removed for ppc
(I think)
Comment 3 Lapo Calamandrei 2002-08-28 04:37:52 UTC
Sorry, I was a bit vague, I'll try to explain a bit better.
The file I'm referring to is /etc/init.d/keymaps in the pkg baselayout.
It loads two keymaps, the one you choose in rc.conf and windowskey which is for
switching consoles forward with left window key (or any or the apple keys on the
mac) and backward with the right one.
With a normal keyboard as the apple pro keyboard, this feature is nice, but when
you use a tibook keyboard, it is annoying.
I believe that the best way is to add an option in rc.conf to enable/disable the
windows/apple key mapping, something like this : 

/etc/rc.conf 
[CUT]
# Use KEYMAP to specify the default console keymap.  There is a complete tree
# of keymaps in /usr/share/keymaps to choose from.  This setting is used by the
# /etc/init.d/keymaps script.

KEYMAP="it-mac"

# Set WINDOWKEY to false to disable the use of window/apple key 
# for console switching

WINDOWKEY=true
[CUT]

/etc/init.d/keymaps
[CUT]
start() {
    checkconfig || return 1
    ebegin "Loading key mappings"
    #new kbd support
    if [ -x /bin/loadkeys ]
    then
        /bin/loadkeys -q ${KEYMAP} >/dev/null
        if ${WINDOWKEY}
        then
             /bin/loadkeys -q windowkey >/dev/null
        fi
    #old console-tools support
    elif [ -x /usr/bin/loadkeys ]
    then
        /usr/bin/loadkeys -q ${KEYMAP} >/dev/null
        if ${WINDOWKEY}
        then
             /usr/bin/loadkeys -q windowkey >/dev/null
        fi
    else
        eend 1 "loadkeys executable not found"
        return 1
    fi
    eend $? "Error loading key mappings"
}
[CUT]
Comment 4 Mark Guertin 2002-08-28 14:06:13 UTC
I discussed this with Azarah and he thinks (and I tend to agree) that this may
be better just documented rather than the file edited as there are very few
cases where this applies (I think).  Any thoughts on this Cal?
Comment 5 Olivier Reisch (RETIRED) gentoo-dev 2002-09-18 04:57:25 UTC
I do not agree. On non US Mac keyboards, u need to define a Mode_switch key in
order to compose special characters like the @, # and many others. In most
distros, this key is mapped to the Apple key (or the alt key, but then u need
the Apple key to do the alt key stuff :P), and if u load Mac keymaps this should
normally be automatically done. However if we remove the Apple key from the
game, it will necessarily do bad stuff to Intl. keyboard layouts, in console at
least, not sure how far ur "windowskey console switching feature" affects XFree.
Comment 6 Todd Heim (RETIRED) gentoo-dev 2002-10-31 08:44:06 UTC
>keyboard with this because you only have L_Alt, and R_Alt is *NEEDED*.
>I usually use apple keys (sice the two keys send the same scancode :-( ) as
>L_Alt and alt key as R_Alt or vice versa.

just FYI: fn+left alt key should produce R_ALT

kind of clumsy, but it works.
Comment 7 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:21:06 UTC
db fix
Comment 8 John Davis (zhen) (RETIRED) gentoo-dev 2003-04-04 01:25:59 UTC
db fix