[ALMOST SOLVED] Pretending an Apple keyboard isn't

I just got an Apple aluminium USB keyboard.  I like the keyboard itself, but I'd like the layout to match the rest of my normal (US) keyboards.  This means:
- Make the function keys default over the multimedia keys (solved)
- Map F13-15 to SysRQ, Scroll Lock, and Pause, respectively (solved)
- Swap the Command (Meta) and Alt keys (solved, see next post)
- Disable Num Lock, and make the numeric keypad always enter digits
- This should all happen automatically when the keyboard is attached, not on boot (solved, see next post)
This has to work both on a VT and in X.  And it shouldn't affect any other keyboards in the system, just the Apple keyboard.  So far, I've done this:
- Add "options hid_apple fnmode=2" to /etc/modprobe.d/modprobe.conf.  This makes the F keys the default
- Used keyfuzz to remap the F13-15 keys:
# cat apple_fuzz
# map F13 to SYSRQ
458856 99
# map F14 to Scroll Lock
458857 70
# map F15 to Pause
458858 119
# keyfuzz -s -d /dev/input/by-id/usb-Apple_Inc._Apple_Keyboard-event-kbd < apple_fuzz
I suspect I need to write a udev rule to run the keyfuzz script when the keyboard is plugged in.
How do I do the rest of these things?  In particular, how do I figure out the scancodes for keyfuzz?  showkey -s gives 0xe0 0x5b for the command key, but "0xe05b 56" doesn't work as input to keyfuzz (EVIOCGKEYCODE: Invalid argument).  And how do I disable num lock?
Last edited by tavianator (2012-02-24 19:54:39)

Hello, sorry to necropost but I came across this thread in my search for the same issue, and I've got a semi-solution that isn't mentioned here yet:
It only works in X, but is a slightly cleaner solution than numlockx. The xkb option numpad:mac changes the keymap so that the numlock state has no effect, and the numpad keys only send numbers.
You can either set it via "setxkbmap -option numpad:mac", or permanently through an X config file like this one:
10-keyboard.conf
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbOptions" "numpad:mac"
EndSection
You can throw as many comma-separated xkb options as you like into that one, I've got a few more to remap some keys. A full list of options can be found @ /usr/share/X11/xkb/rules/base.lst
Last edited by tammer (2013-01-25 21:52:44)

Similar Messages

  • [SOLVED] Apple Keyboard UK keymap

    Hello
    I use a UK Apple keyboard with my Arch box, I'd really appreciate it if someone'd point me in the right direction to get this set up properly!
    Right now I can't type pound symbols, instead I get hash symbols, I should be able to type pound symbols with Shift+3 and then hash symbols with RightAlt+3
    Thanks in advance!
    Last edited by Starfall (2011-09-03 19:46:31)

    Hmm, I've had no luck with getting any of the media keys to work Very frustrating having to pull the mixer up every time I want to adjust the volume.
    Thanks for your post kaptenen, I have applied your config to my evdev conf, although this has given me the ability to type pound and hash symbols, unfortunately it seems it's mixed up a fair few other of my keys.
    Appreciate the help with this guys
    EDIT:
    Thought it might be easier to help out if you guys could see my configs, perhaps something stupid I might've mucked up:
    Here's my '10-evdev-conf' :
    Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "xkb_layout" "gb"
    Option "XkbVariant" "nodeadkeys"
    Option "XkbOptions" "apple:badmap"
    EndSection
    Note: The line 'Option "xkb_layout" "gb" ' I have tried with 'gb' 'uk' and 'se'
    Also, here's my output from '$ setxkbmap -print -verbose 10' :
    Setting verbose level to 10
    locale is C
    Couldn't interpret _XKB_RULES_NAMES property
    Use defaults: rules - 'base' model - 'pc105' layout - 'us'
    Applied rules from base:
    rules: base
    model: pc105
    layout: us
    Trying to build keymap using the following components:
    keycodes: xfree86+aliases(qwerty)
    types: complete
    compat: complete
    symbols: pc+us+inet(pc105)
    geometry: pc(pc105)
    xkb_keymap {
    xkb_keycodes { include "xfree86+aliases(qwerty)" };
    xkb_types { include "complete" };
    xkb_compat { include "complete" };
    xkb_symbols { include "pc+us+inet(pc105)" };
    xkb_geometry { include "pc(pc105)" };
    Interesting because it states my layout is 'us' ?
    And finally here's my locale section from my rc.conf, just in case:
    LOCALE="en_GB.UTF-8"
    DAEMON_LOCALE="no"
    HARDWARECLOCK="UTC"
    TIMEZONE="Europe/London"
    KEYMAP="uk"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    Last edited by Starfall (2011-08-31 18:51:51)

  • Mac Book Pro with a separate apple keyboard (wired) randomly the keyboard will make a thudding noise like a key is depressed and then freezes

    Hi I'm using a Mac Book Pro with a separate apple keyboard (wired).  Randomly the keyboard will make a thudding noise like a key is depressed and stuck (which it isn't) which then stops when the keyboard is unplugged.  I've tried rebooting, plugging it into another port and unplugging  my mouse from it and it hasn't solved the issue.  I also can't pin point when it does it, it seems to be random so sometimes, like now it's fine and then others it does it every few minutes.  I'm reluctant to throw the keyboard out if there is a chance it can be fixed.  Any ideas?

    You cannot use any additional devices on the keyboard's USB ports when used in this fashion (except perhaps ONE low power Apple mouse). Anything more draws too much power and may make the keyboard malfunction. In general, keyboards do not tend to complain about low power, they just stop working properly.

  • Brand new Macbook Pro not pairing with Apple Keyboard and mouse!

    Hi all, I have a brand new Macbook Pro and an older wireless Apple Keyboard and Mouse (that were being previously used with my imac G5).
    Now I want to use these for this macbook. I am finding that they are being recognised but not pairing up?
    Do you need to stop the previous pairing with the imac before they will pair with the Macbook?
    Or do I need to update specific software? (I would have thought it has all the necessary updates already installed).
    I am running Snow leopard.
    I have brand new batteries in the keyboard and mouse.
    I really appreciate any helpful advice. Sorry if the answer is obvious!
    Thanks

    Hi there, i had a problem pairing an Apple wireless keyboard with my MacBook pro but managed to solve it.
    The default passkey option in Bluetooth setup assistant is 'automatic' which will (if the MacBook can 'see' the keyboard in the first instance) then say something like 'your device may prompt you to enter the following passcode 1234 5678'
    Obviously the keyboard doesn't provide any feedback - I went ahead and typed the number and hit the return key a number of times - the MacBook then displayed a 'pairing failed - you may have entered the incorrect passkey' message.
    What i was doing wrong was keying only numbers - when i keyed 1234[SPACE]5678 + RETURN pairing worked.
    I had thought the 'gap' in the passcode was to make it easier to read, not that it implied a space in the passcode.
    Hope that helps.
    Simon

  • Apple Keyboard in Windows doesn't like External HD

    I just bought a new Apple keyboard to use on my native Windows XP Pro machine at work. Note: this is not Windows in Boot Camp; it's a Dell PC.
    When I have the apple keyboard plugged in to the USB at the same time my external hard drive is connected, the HD will stop working, and Windows won't recognize it. As soon as I unplug the apple keyboard, the hard drive will be recognized by Windows and will load up normally.
    Each peripheral works fine when the other isn't plugged in, but as soon as they're both plugged in, they have a stand off.

    Its not normal, stannard, but it is certainly technically possible for this to occur. If the drive draws more current than it should for some reason (ie more than the regular FW specioication) then the port may not be able to provide sufficient. I have seen similar problems mentioned as an issue with bus powered USB devices on some PBs, for example, and it can be common in situations where more than one bus powered device is attached simultaneously on many computers.
    You are probably more likely to run into such an issue when running from battery rather than the mains I would think.
    Different computers have different abilities in this area, so the fact that the drive won't work on one computer but will on another is not altogether surprising, although it is uncommon, even if everything is working OK. Does the bus powered drive have a power connection option? Some do. It would be interesting to see if it worked when provided with an independent supply.
    Have you tried another cable, yet? Cables really can be the bane of your life when it comes to firewire.
    Some cable manufacturers actually sell cables that provide a visual indication of power and data availability - see http://www.granitedigital.com/catalog/pg18_firewirecables.htm for example. Worth considering, though I haven't tried them myself.
    The article at http://www.wiebetech.com/whitepapers/FireWirePortFailures.php is interesting, by the way. Some of the stuff in http://www.macintouch.com/panfirewire04.html is too.
    Cheers
    Rod

  • New (iMac) Apple keyboard - don't hurry to replace it

    I've been a fan of "clicky" keyboards since my first computer, an IBM PS/2 from a long time ago in a galaxy far away. When Matias sold the first "Tactile Pro" keyboard ( http://matias.ca/tactilepro/index.php ), I quickly purchased one for my old iMac; I still use it to this day and love it. So Matias rolled out Version 2.0 ( http://matias.ca/tactilepro2/index.php ) - in colors matching the new iMac, no less - I ordered one the same day I ordered my new iMac.
    After using the included new Apple keyboard for a week, I finally received my new Tactile Pro. And I must say, I'm disappointed.
    The not-so-obvious problem is the advertised USB 2.0 "hub" which isn't really a hub at all. Matias cheated: the keyboard has two USB cables, the second of which just relocates an existing port from the iMac to the keyboard. Worse, this one (one?!?) port is on the right-side of the keyboard and facing right, where it is typically blocked by mouse placement and thus unusable. What a waste of scarce USB ports.
    The above would be less of a problem if the second cable were removable, which it is not, leaving its connector dangling uncleanly off the back of the computer. And that cable is one of two ways in which version 2.0 of this keyboard falls short of version 1.0. The cable is too stiff, too short, and too inconveniently placed. Out of the left side only? Not redirectable like on 1.0 or most any other keyboard? And coming out of the keyboard sideways, instead of forwards? Ugh.
    But the greatest shortfall of the new Tactile Pro versus its predecessor is the quality of its keys. Matias has clearly cut some corners on the key-switches: they are much softer and thus provide less tactile feedback. Even worse, the keycaps are rather loosely attached to the switches.
    I'm not asking for a refund, as this keyboard is marginally better in its tactile feedback and styling than Apple's new aluminum keyboard. However, the Apple keyboard costs $100 less, uses a more convenient cable (cable_, singular, not cables, plural), and provides 2 USB 2.0 ports, one out each side. I was also planning to replace the Tactile Pro 1.0 on my old iMac with the 2.0 - not any more.
    (Alternatively, try to find the original Tactile Pro on close-out or places like eBay.)
    That's my opinion & experience - YMMV.

    Probably not - but that certainly does not involve iPhoto for the Mac - you need to look at Crashplan support for you options 
    And iCloud is not a place to store photos so that is certainly not a possibility
    If you restore your masters folder out of the iPhoto library you will have all of your original photos to do with what you please
    LN

  • I just installed RAM into my 2007 Mid iMac. I went to turn it on and the fan goes on and such. The screen isn't lighting up and (Caps lock) the keyboard isn't working. It's plugged in too.

    Installed two 2GB RAM cards to my Mac. Plugged it in, turned it on. You can hear it running. My keyboard isn't lighting up (Caps Lock) and the screen is black.

    Assuming the RAM is to the exact spec required, try re-seating the RAM. When you think it is fully seated give it an extra shove with both thumbs - it only needs to be a fraction out for it not to work. If that fails to solve the problem, put the old RAM back in and test. If it works that narrows it down to the new RAM being the problem.

  • Non-Apple Keyboard: any way to control system audio volume?

    I have a non-Apple Keyboard on my new Mini Lion 7.2.1
    Is there any way to control system audio volume via the keyboard ?

    Well. I can do this. But just because, on my Apple keyboard, there are the keys that do the job. There's a key to mute, and the keys to adjust low and high the sound. But keyboard shortcuts, I don't think exist. The aren't in keyboard shortcut in Keyboard panel, within System Preferences. The bottom line is that isn't a menu item in Finder for lower sound and higher sound. The only option would be an AppleScript that you save as an applet within Scripts menu (activated in Finder via Script Editor) and you invoke with a shortcut... Well, you can do it, if you open the script Set Output Volume in UI Elements Script folder within Scripts folder. Try it out!

  • Apple Keyboard used on MacBook: Some keys not working

    Hello,
    I use an Apple Keyboard (USB-connection, aluminium, Model No.: A1243, 2007) for typing longer texts when my MacBook is connected to an external monitor.
    Since I have re-installed the OS X software on my MacBook because I had to replace the hard drive, the Keyboard doesn't work successful. Some keys just don't work; The letters cannot be typed. (Affected keys: "8", "I", "K", "," and number pad keys "7", "4", "1")
    I installed all software updates for keyboards that could be found on the apple support webpages.
    The keyboard istelf doesn't show any defects for me.
    What can I do to solve the provlem? Or to get to know if it's a software-based problem? I want to exclude all possible software reasons.. In a worst case I have to replace the keyboard, I think. But it always worked fine and a new one can be expensive.
    Thank you for all hints!
    Message was edited by: fritzmartini

    have you tried command-option and the keys? or command and one of the keys? if so did it work??? if not, try going into the finder, and go to preferences file, but did not know which one would be the culprit. The strategy I adopted, which took me back to my System 9 (and earlier) days, was to go into the Library folder of the affected user account, open up the Preferences folder (after backing it up elsewhere on the hard drive), and take out a small number of files (.plist files, etc) at a time, log out then back in and note any changes. The theory is that if there were any changes then it is most likely that the offending file was in the last group to be removed. You would then replace those files one at a time until the problem returned. Eventually I found the culprit. To my surprise it was the com.apple.loginwindow.plist file. Removing that cured things completely.
    Why that particular preference file affected that particular key is beyond me, but it fixed the problem!

  • Old white apple keyboard wont allow my windows 7 pc to start up

    Hi Guys, I just bought an old white apple keyboard for my windows 7 machine because i love the look of the white and see through plastic. If i turn on my pc it says keyboard failure press f1 or f2. Now if i plug my old keyboard in and log in to the desktop and then turn plug the apple keyboard in, it downloads drivers and installs them and i can use the keyboard perfectly, but every time i shut down and restart, it says keyboard failure. Is there any way for me to fix this, else i will forever need to log in with my dell keyboard and then change to the apple keyboard. Thanks for any advice. Russ

    Hi all.  I can’t tell you how to solve your iCloud 3.x issues.  Heck, I don’t think they’re even solvable.
    But if you had a previous version of iCloud that was working correctly then I can definitely tell you how to solve the “iCloud Photo Stream is not syncing correctly to my Windows 7 PC” problem.  …without even a re-boot.
    Log out of iCloud 3.0 and uninstall it.
    Open My Computer and then open your C:\ drive.  Go to Tools/Folder Options and click on the View tab.  Select the “Show hidden…” radio button and click on OK.
    Open the Users folder.
    Open your user folder
    Open ProgramData (previously hidden folder)
    Open the Apple folder – not the Apple Computer folder.
    Open the Installer Cache folder
    In Details view sort on Name
    Open the folder for the newest entry for iCloud Control Panel 2.x – probably 2.1.2.8 dated 4/25/2013
    Right click on iCloud64.msi and select Install.
    When finished, the synching between iCloud and your PC will be back to working perfectly as before the 3.0 fiasco.  The pictures will be synched to the same Photostream folder as before the “upgrade”.  Now all you need to do is wait until Apple/Microsoft get this thing fixed and working before you try the 3.x upgrade again.
    I think the iCloud 3.0 software was written by the same folks who wrote healthcare.gov with the main difference being that healthcare.gov might eventually be made to work.
    For those of you who hate to go backwards, think of it as attacking to the rear.  Which would you rather have, the frustration of no synching or everything working on an older version?
    Good luck…

  • New Apple Keyboard Incompatible w/OS 10.4.11 is there a Solution?

    I have a new Apple Keyboard with Numeric Keypad but it isn't  working correctly with my Dual 2.3 GHz PowerPC G5 running os 10.4.11.
    The problem is the top row of Function Keys (such as monitor brightness keys, speaker volume and on/off keys, etc) do not work correctly.
    Is there any sort of software patch I can download to correct the way the keyboard is programmed so it will work correctly with my computer's OS, or is any other workaround?
    Thanks a bunch.

    Hello, I consider what Apple did with that KB silly as can be.
    I think Spark cured this for another person and the same problem...
    http://www.shadowlab.org/Software/spark.php
    http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele
    http://doublecommand.sourceforge.net/

  • Using apple keyboard w/PC XP issues

    Hi all,
    I'm running a DELL laptop (yes I know, first mistake)....and I have bought a Apple keyboard w/numeric pad. The problem I'm having is when I open up my browser where it be Google Chrome or Internet Explorer, the bottom of the screen comes up and starts flashing. It is basically the HTML of the site and sometimes shows it. I can't figure out what is causing the conflict. Right now, there is no conflict and it is working perfectly. Rebooting doesn't solve the problem either. It does it when it wants to and does it 90% of the time. Any help would be greatly appreciated. Thanks!

    Davey02780 wrote:
    Actually it does have to do with the Apple keyboard because the keyboard states you can use it with a PC. I have tried another keyboard and the problem does not happen thus its an Apple/PC conflict.
    You did not mention another keyboard in your previous post and we can't read you mind.
    The keyboard has nothing to do with the way a webpage is displayed so I still fail to see how it's the Apple keyboard.  Like I said, run the computer for several days without the Apple keyboard and if the issue appears, you will have definitive proof that it's not the Apple keyboard.  But if it does NOT appear, that does NOT mean that it must be the Apple keyboard's fault.  (You can't prove a negative.  Google that if you dont' know what that means.)
    I don't see our conversation going in a way that you'll like after this so I'll stop here (unless someone posts areasonable and logical possibility and solution that I can contribute to.)  Otherwise, luck be with thee!

  • Using ALT+cursor function of apple keyboard for windows program

    Not sure where to ask this question, but here goes. My company uses a web based transportation routing program I can access from my home computer, (which is a Mac using Mac, not windows).
    Using the program requires the ability to often select or deselect lines from a group of lines to send to be routed. Using a Microsoft keyboard I would simply press ALT and then select with the cursor the lines I want. When I am using my apple keyboard this does not work.
    I know that the command key takes the place of the ALT key, so you would think that I would simply press Command and select with the cursor, but this does not work. Therefore all I can do is select all or none.
    Anyone have a idea of another combination of keys that will work for this?
    Thanks
    I am using the standard apple keyboard with the numeric keys

    Not sure why that isn't working. I have a page displaying below from the Apple Support website, with three different lines selected:
    The purple highlighted lines are all selected independently of one another. Maybe it is the type of webpage or data?
    GB

  • Apple Keyboard not working

    HI, I have an iMac from late 2009, when I tried to type in my password it did not register letters. I tried all the usual things, replaced batteries, turned things off and on again but still no luck. I then connected it to my iPad Air 2 and it worked fine, so the keyboard is still functional however i have no clue what else I can do!
    Any help would be much appreciate,
    Thanks
    Tom

    You may use a wired USB keyboard which could also help troubleshoot the computer.
    If there is a hardware reason inside the computer for the failure of Bluetooth, then you
    may seek to have it looked into at an Apple Store genius bar (with appointment) so as
    to see what may be the cause of this symptomatic failure. And if the iMac is under
    warranty, they can refer you to repair; the diagnostic is usually without cost at official
    Store. And if no official Apple Store with genius bar is available, an authorized Apple
    service provider location or specialist may be able to help resolve issues.
    If the keyboard isn't syncing with the iMac, there may be other things to be done, but
    a working USB keyboard is first in the line of troubleshooting items to have on hand.
    If you have an Apple USB keyboard, that's best. You could use Windows PC keyboard
    but some keys are different; these are linked sources to read and understand how to
    use a windows keyboard where certain keys have other meaning...
    From apple, covers most keyboard issues, also helpful with windows on Mac:
    •Boot Camp: About keyboards and key assignment for Microsoft Windows - Apple Support
    From microsoft:
    •Keyboard Mappings using PC Keyboard on a Macintosh:
    https://support.microsoft.com/en-us/kb/970299
    There is a reset, usually best done with USB wired keyboard, that may help, the SMC
    or system management controller could help items work that aren't doing well. Or if
    the problem relates, there is different reset NVRAM that does some other stuff.
    •Resetting the System Management Controller (SMC) on your Mac - Apple Support
    In any event...
    Good luck & happy computing!

  • Mac mini will not recognize boot key sequences from new Apple keyboard

    Just in case anyone else is in the same boat as me - be forewarned. My mini died on me all of a sudden last week. My initial thought was that it was a hard drive failure. It wouldn't boot up at all. I was just stuck at the grey apple, cranking gear screen.
    I tried the usual stuff at first. Tried to boot from CD. Booting from an external FireWire drive. Nothing worked. Reset SMC, etc. Nothing worked.
    So I brought in the machine to my local Apple store and talked to the Genius. He said I had a bad logic board, and that replacing it would cost almost as much as the computer. I contemplated the idea, but couldn't afford to pay for this.
    So, instead, I just went without my mini for a couple of days - opting to use my Macbook instead. Then I decided that maybe it was the keyboard that was the issue. And yes, indeed, that was the problem. Using any other keyboard (even non-Apple keyboards) allowed me to boot from external devices, which then allowed me to identify that the issue was, in fact, a bad hard drive.
    Long story short. 1) This issue needs to be remedied by Apple in some way, shape, or form. There must be others with a potential dying hard drive in the waiting with new aluminum keyboards. 2) The Genius should have known about this issue as well.

    Any workarounds apart from the obvious? (I'd hate to stop using my otherwise awesome keyboard).
    The new aluminium keyboard is not fully compatible with the Mac mini. It works perfectly well in general use, except that it cannot be used with modifier keys at startup for such things as booting into safe mode, to access the boot loader screen or to boot to the optical drive.
    While this is a bizarre issue which it is hard to understand has not been resolved, it has been a long standing issue and well reported here. The workaround is the obvious one, to use almost any other USB-connected keyboard if the system needs to be booted with a modifier key. There's no need to stop using your aluminium keyboard if you like it - just not for situations where you need to modify the boot process.

Maybe you are looking for

  • How to link a document in Framework

    In CWB Home Page there is ability to link to various URL. I know how to link to a Portal. But I need to link to a Document (Word or PPT) which is located in Shared Servers. If this is possible , How do I write the full Path which includes the documen

  • BAPI_MATERIAL_MAINTAINDATA_RT gives error KM701, but manual entry succeeds

    I have written a program which creates a new material using function module BAPI_MATERIAL_MAINTAINDATA_RT. I get the following error: KM701 Profit center K100/12345 does not exist However, I can add the same profit center (12345) to the article in tr

  • Converting File Content: 2 different record structures

    Dear all, I have the following question: Is the PI 7.0 file adapter capable to convert the file content of a file which has two different record types? E.g. Rekord 1: String(2) String(4) String(19) Rekord 2: String(2) String(7) String(8) In the XML s

  • MSS Error Page Counter is not set.

    Hi,      I am using EP 7.01 and ECC 6.0 I am getting error in MSS-->Inbox and selecting the option PCR  contract agreement generation ,then getting the error like Page counter is not set. How to resolve this error? Can someone give the solution? Than

  • Problem transfering movies

    i'm trying to transfer movies to my friends ipod, but it's not letting me. these are movies that i own and have transfered into ipod format. i have the 160gig and my friend has the 30 gig.....in case this matters. is there a setting i need to change?