Okay, so I have a mid-2010 MacBook Pro (unibody design) and I have the typical problem with the keyboard. My shift key function is "stuck" so everything WILL COME UP LIKE THIS> (hence the > instead of the period). I booted into a flash drive to update to Lion and the keyboard still typed like the shift key was pressed. Well, we went to Apple to see what they could do. They said that the top case has to be replaced. The problem is, that runs a whopping $250+ and that's out of my budget right now. I have been searching around and haven't seemed to find much of a solution anywhere. I have seen that (at least on here) that the keyboard itself can be replaced without having to replace the entire top case. Nothing has been spilled onto the keyboard and it is not dirty as I have taken a few keys off and checked underneath. So if I replaced the keyboard only, would that fix the problem? Anyone have any experience with this?
MacOS – Left shift key unresponsive and stuck
keyboardmacbook promacos
Related Solutions
I answered a similar question several months ago, the answer is somewhat applicable here as well.
Try this...
- Power on your Mac while holding the option key on your keyboard. If done correctly, and assuming a firmware password is not set, you should see your internal hard drive show up on the display. If you DO have a firmware password set then you will be prompted to enter the password before moving on. This is just to verify what you should see.
If you don't see these screens then your key is likely failed at the hardware level. If this is the case then you have to replace the entire top case since the keyboard is built into this component. If the key had popped off you could replace just the key but any sort of functional (non cosmetic) repair requires the keyboard be replaced. The repair for this isn't terribly difficult although it is somewhat involved since the top case is basically the chassis that everything bolts to, meaning you have to tear the MacBook Pro down completely in the process. iFixit has a great guide (and possibly a replacement part) that shows the process.
If you see what I describe above then your key is functioning properly at the hardware level and the issue instead rests somewhere in your operating system. To narrow down the issue I would create a test user account (or just enable and login to the Guest user) to see if the issue persisted when logged in as the test user. If the issue persists for the test user then it's a system wide issue, if it doesn't then it's something in your ~/Library folder. If that didn't do the trick I would use Disk Utility to repair permissions, verify and repair the disk. If need be I would reinstall the operating system, without first erasing the disk assuming you have data you'd like to preserve.
Hopefully that puts you in the right direction, good luck!
From your edits, it seems like the specific keyboard you're using is causing the problem. I don't know any way to fix that, unfortunately, but I thought I'd answer the original question anyway.
You can remap modifier keys in OS X from at least 10.4 through to 10.10.4 by changing a Property List (.plist) file. The file is located within ~/Library/Preferences/ByHost
, and is named .GlobalPreferences.[a long identifier].plist
, where each user's long identifier varies. (In the Terminal, you can just use Tab-completion to pick up the specific name of your file.)
Here are the steps to copy, convert, edit, and replace the .plist:
- In System Preferences > Keyboard, click "Modifier Keys" and remap at least one of the buttons (e.g. Caps Lock > Control). This will ensure that the proper section exists in the .plist, and make it easier to find.
In Terminal, go to or create a directory where you'll do the work, then:
cp ~/Library/Preferences/ByHost/.GlobalPreferences
(then press Tab to autocomplete the unique filename)plutil -convert xml1 -o ./keys-xml.plist ./keys-binary.plist
Open the converted XML file. (You can use
open /Applications/TextEdit.app keys-xml.plist
to launch TextEdit from the Terminal.)- Locate the section in the file called "
com.apple.keyboard.modifiermapping
...". You should see at least one "dict" group within that section. It will actually be one entry per specific key that's been remapped, so if you remapped Control to Shift, you'd see entries remapping LeftControl to LeftShift and RightControl to RightShift. - Modify the existing entry using the table below, changing the
HIDKeyboardModifierMappingSrc
key value to the Source key (the physical button you'll press, and theHIDKeyboardModifierMappingDst
key value to the Destination key you want (the key you want to take effect). - Copy the entire dict section (from
<dict>
to</dict>
, including the key mappings, and paste one per key you want to remap, changing the Src and Dst for each. - Save and close the file. Then, back in Terminal:
plutil -convert binary1 -o ./keys-binary_new.plist keys-xml.plist
cp ./keys-binary_new.plist ~/Library/Preferences/ByHost/.GlobalPreferences
(then Tab to autocomplete)
- Log out and back in for the changes to take effect.
Here are the key values to use for each modifier key in the Src/Dst mapping:
+-----------------+-----------+
| Key Name | Key Value |
+-----------------+-----------+
| None | -1 |
| Caps Lock | 0 |
| Shift (Left) | 1 |
| Control (Left) | 2 |
| Option (Left) | 3 |
| Command (Left) | 4 |
| Keypad 0 | 5 |
| Help | 6 |
| Shift (Right) | 9 |
| Control (Right) | 10 |
| Option (Right) | 11 |
| Command (Right) | 12 |
| ~~Kernel Panic~~| ~~16~|
+-----------------+-----------+
NB: Key Code 16 should typically not be used.
Source: Rewritten from http://hints.macworld.com/article.php?story=20060825072451882
Related Question
- MacBook – Trackpad and keyboard of MacBook Pro unresponsive
- MacOS – Shift key stuck in software after login, reboot fixes this
- MacBook – How to Disable Left Command key
- MacBook-Pro Keyboard – How to Fix Stuck Keys or Recognition Issues
- Keyboard – Fix CTRL+SHIFT+D/E/F Key Combinations Not Working
- macOS – Fix Left Shift Key Outputting ±
Best Answer
Try
via
osascript
.