thinkpads.com Support Community Forum Index Bill Morrow's thinkpads.com Open Forum - The Original Thinkpad Support Forum
Follow ThinkpadsForum on Twitter
 Support this forum, shop at newmodeus.com
 Support the forum, shop at newmodeus.com
System backups occur about 7:00 am EDT and last about 10 minutes. This will slow performance. RSS feeds have been added to the forum.
Donate if you wish to:
bill at thinkpads dot com

It is currently Thu Jul 24, 2014 3:24 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 24 posts ] 
Author Message
PostPosted: Tue Jul 03, 2012 3:58 pm 
Offline

Joined: Sat Jun 23, 2012 3:38 am
Posts: 4
Location: Espoo, Finland
Based on the information I found in this forum and tpuser (http://www.tpuser.idv.tw/wp/?p=1815). I changed both my keyboard and palmrest of my X230 to the ones of X220. The hardware installation is generally smooth. One small trick is that the keyboard should be put in place first, than the palmrest. The reason is that there are two small bumps at the two ends of the bar where the speaker/power buttons lying, which prevent the keyboard to be installed properly if the palmrest is already installed. The hardware works well after the replacement, and the finger print reader even directly recognised my fingers without re-learning.

Even though the classical keyboard is a tad higher, there is still good clearance between the LCD screen and the keyboard. So no problem on that.

The keys on the seventh row are mostly not working, including PrtSc, ScrLk, Pause, Insert, and Home. Actually the only problem is the Home key, as other keys are non-essential. Another problem is that the keys are mis-mapped. This problem is rather easy to solve, using e.g. the software AutoHotkey. I implemented a script below. The mapping makes the PgUp, PgDn, and Delete keys to function properly. The End key was not changed, so no mapping is needed. The only missing key is the Home key, I mapped it using Ctrl-PgUp, and Ctrl-PgDn as well for the End key. I also mapped Ctrl-Delete for the Insert key, I don't know when I used it last time, but anyway.

I use a docking station, so the mapping, if not turned off, will also affect the external keyboard. The solution is to use the CapsLock key to turn the mapping on/off, rather convenient. This is also the reason that I do not use registry tweaking tool such as SharpKeys, which should be fine if you never use an external keyboard.

I don't care about the Fn+Key settings. If someone is interested in, you may hack the registry of TPHOTKEY.

So the keyboard is generally working. Of course, if someone will hack the BIOS, that will be very welcome. Nevertheless, I am pretty happy with the current state already. The most important part is the responsiveness of the keyboard, and the track pointer and the buttons are also higher, a much better ergonomic design.

Script below, if you use the classical keyboard and want to use AutoHotkey.

SetCapsLockState, Off

^Del::
SendInput {Home}
return

^Ins::
SendInput {End}
return

^Home::
SendInput {Ins}
return

Del::PgUp
Ins::PgDn
Home::Del

$CapsLock::
Suspend, Toggle
return


Top
 Profile  
 
PostPosted: Tue Jul 03, 2012 5:01 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Do you know if Home emits some scancode (that just isn't mapped to any specific key)?
Can scancodes be used as selectors in AutoHotKey scripts?

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 2:24 am 
Offline

Joined: Sat Jun 23, 2012 3:38 am
Posts: 4
Location: Espoo, Finland
I used the SharpKeys to test the keyboard. There is no scan code for the Home key, and other four keys: PrtSc, ScrLk, Pause, and Insert. That means the SharpKeys will not detect if I pressed a key on not. So I guess the BIOS has masked those inputs, and a BIOS tweaking should be necessary.

But I felt a Ctrl-PgUp for replacement of the Home key is acceptable solution, because it was the shortcut used in many software as well.


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 3:58 am 
Offline
Junior Member
Junior Member

Joined: Mon Oct 05, 2009 11:05 am
Posts: 438
Location: Russia, Moscow
But still it spoils the entire idea. There are 2 main points in replacing the keyboard:
1) To get rid of the island-style keys. I'm not sure whether it really matters or not, as many people out there say Lenovo made it chicklets well, if not better than the old-style keys.
2) To get the old good 7-row layout, which we're all accustomed to. With the inability to use some of the 7-row keyboard keys it is pretty far from the layout we're accustomed to.

I guess we have to wait until someone with good skills at BIOS tweaking succeeds. I hope this day will finally come.
Or maybe Lenovo will just come and say "okay, we were wrong, shame on us. All the new models, beginning from X240, will feature the classic keyboard" :mrgreen:

_________________
Lifebook P1032 (1024*600 8.9") => Averatec AV1000 (1280*800 10.6") => Kohjinsha SH6 (1024*600 7.2") => Sharp M4000 (1280*800 13.3") => X200-AFFS, dead (1280*800 12.1") => X200s-AFFS, later -PVA (1280*800 12.1") => X220 4290RV5 + Intel 310 80GB


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 5:40 am 
Offline

Joined: Sat Jun 23, 2012 3:38 am
Posts: 4
Location: Espoo, Finland
To me the most important thing is the feeling of the keyboard and the location of PgUp/PgDn, and much reachable F1-F12. The new island style key, at least the one with backlighting came with the X230, is HORRIBLE! I felt my fingers were burnt by the strange feeling of the keyboard. It is not like any keyboard I used to type, I mean, the good Logitech keyboards.

Nevertheless, I will check the possibility of kernel mode driver, because obviously SharpKeys was not programmed deep enough.


Top
 Profile  
 
PostPosted: Wed Jul 04, 2012 5:50 am 
Offline
Junior Member
Junior Member

Joined: Mon Oct 05, 2009 11:05 am
Posts: 438
Location: Russia, Moscow
zqhz wrote:
Nevertheless, I will check the possibility of kernel mode driver, because obviously SharpKeys was not programmed deep enough.

SharpKeys by itself does nothing, it is just a front-end for a Windows registry.
If SharpKeys does not detect a key press, then it didn't reach Windows at all, and BIOS did not emit the keypress event with some scancode.

_________________
Lifebook P1032 (1024*600 8.9") => Averatec AV1000 (1280*800 10.6") => Kohjinsha SH6 (1024*600 7.2") => Sharp M4000 (1280*800 13.3") => X200-AFFS, dead (1280*800 12.1") => X200s-AFFS, later -PVA (1280*800 12.1") => X220 4290RV5 + Intel 310 80GB


Top
 Profile  
 
PostPosted: Thu Jul 26, 2012 10:23 am 
Offline
Sophomore Member

Joined: Fri Dec 24, 2010 8:02 am
Posts: 159
Location: Paris (Latin Europe)
Well, that's not an ultimate BIOS-based solution, but it's still very helpful as an intermediary solution.
Thanks for sharing!

_________________
T60 2007-FSG (stolen)
X220 4287-CTO
X230 once it can accomodate a proper keyboard


Top
 Profile  
 
PostPosted: Thu Jul 26, 2012 11:05 am 
Offline
Junior Member
Junior Member

Joined: Mon Oct 05, 2009 11:05 am
Posts: 438
Location: Russia, Moscow
So, I was able to gather it all into the following explanation.

There are:
Physical keycodes.
The keyboard sheet is designed as the matrix of rows and columns (e.g. for Thinkpad that would be, I guess, 8 rows and 15 columns or so. There are rows+columns (8+15=21) pins on the cable which allows for keypresses detection (when one presses a key, they shorten the corresponding row and column wires). The keyboard sheet is passive, it has no chips, just the wires and keycaps, and thus is extremely easy to produce.
Logical scancodes.
There is a special controller that frequently polls (checks) the keyboard sheet to detect keypresses. Once it detects that e.g. the thirs key in the fourth row was pressed, it, knowing the physical layout of the keyboard sheet, emits the scancode that "S" key was pressed. On the standalone PS/2 and USB keyboards the controller is inside the keyboard assembly (so that the keyboard is the keyboard sheet plus the controller plus the case). On laptops the controller is part of the BIOS.
Logical letters.
The OS receives a scancode, and then it needs, knowing the "S" key was pressed, to tell the application whether it was capital "S", or the lowercase "s", or the "o" because the dvorak layout was in effect. Windows has an additional layer, allowing one to define scancode conversion keymaps (e.g. "If you received the "S" scancode, process it as if it was "D" scancode").

Now, the main problem is the old keyboard being of the different physical layout, compared with the new keyboard. Some of its keypresses send the "row-column" data that BIOS is unable to parse (because it does not know of such row-column combinations), and thus BIOS does not emit a scancode for such keys. From the other hand, BIOS will never emit some scancodes because the corresponding row-column combination is only found on the new keyboard.
Making the things even worse, there are vendor-specific keys (the obvious example is Fn) that do not make it into scancode at all, with BIOS directly processing the keycodes (if you press Fn+PgUp for example, BIOS will detect the Fn keypress, the PgUp keypress, but instead of sending two scancodes into OS it will rather send some "ThinkLight was toggled" signal). Thus, such keys or key combinations could not be remapped in OS at all. The BIOS will always send the "ThinkLight was toggled" signal when the row 7 column 1 and row 1 column X keys were pressed simultaneously, no matter what keyboard was plugged in.

So, while it is possible to do some remappings in the OS, in order to utilize at least some keys on the legacy keyboard one will need for BIOS to know about the legacy keyboard layout. Which I fear might not happen in the near future.

_________________
Lifebook P1032 (1024*600 8.9") => Averatec AV1000 (1280*800 10.6") => Kohjinsha SH6 (1024*600 7.2") => Sharp M4000 (1280*800 13.3") => X200-AFFS, dead (1280*800 12.1") => X200s-AFFS, later -PVA (1280*800 12.1") => X220 4290RV5 + Intel 310 80GB


Top
 Profile  
 
PostPosted: Wed Apr 03, 2013 4:38 am 
Offline

Joined: Wed Apr 03, 2013 4:14 am
Posts: 2
Location: Vienna, Austria
Hi,

I am not happy with my new keyboard, and found your thread.

Could you answer me some questions about your mod?


Which parts exactly did you change?

Keyboard, Palmrest (just the cover, or do i need new touchpad and fingerprint as well?).

And the X230 bezel will fit?


There are X220 keyboards with the big old enter key, and some with a single row verison.

Does it have to be a specific model?


cheers


Top
 Profile  
 
PostPosted: Wed Apr 03, 2013 1:53 pm 
Offline
Sophomore Member

Joined: Sun Aug 15, 2010 2:38 pm
Posts: 239
Location: Westminster, California
That's rad. A great mod.

_________________
Có một ngày tuyệt vời!


Top
 Profile  
 
PostPosted: Thu Apr 04, 2013 12:21 am 
Offline
moderator
moderator

Joined: Fri May 13, 2005 1:33 pm
Posts: 4124
Location: Minnesota
The X220 keyboard will physically fit in the X230 chassis, but the problem is the key mapping in the BIOS is very different. While the letters work fine, a lot of the function and keyboard shortcut keys have been moved around or removed from the X230, which presents it's own set of problems. If you're willing to live with it, I personally wouldn't, then you can put the X220 keyboard in. If you really dislike it that much, I'd say sell the X230 and buy a X220. There's little difference between the two, other than USB 3.0, and you might put a few bucks in your pocket.

_________________
ThinkPad X220


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 5:09 am 
Offline

Joined: Wed Apr 03, 2013 4:14 am
Posts: 2
Location: Vienna, Austria
i already got the x230, and i wouldn't mind the key mapping problem.

please tell me which parts i have to change.

some people say keyboard, palmrest and keyboard bezel,
some just say keyboard and palmrest.

and will my fingerprint reader and the touchpad fit into the palmrest of the x220?
will i have to change them too?


thx


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 1:40 pm 
Offline
moderator
moderator

Joined: Fri May 13, 2005 1:33 pm
Posts: 4124
Location: Minnesota
I put the keyboard from my X220i into the X230 review unit I had and I did not swap any other parts. It seemed a good fit to me.

_________________
ThinkPad X220


Top
 Profile  
 
PostPosted: Sun Sep 29, 2013 11:16 pm 
Offline
Freshman Member

Joined: Thu Apr 04, 2013 11:33 pm
Posts: 109
Location: Alvorada, RS, Brazil
I'll speculate a little.

The keyboard probably is not too "dumb". The BIOS can identify the different keyboard layouts: English, French, Japanese, etc.

Five keys do not work. How could they produce scan codes?

A Japanese keyboard has 4 extra keys that do not exist in other languages. If I would heavily modify a keyboard, so that I could remap the matrix, I would use a Japanese keyboard controller, and map the four of the five missing keys to the extra Japanese ones. They would still generate wrong scan codes, but those then could be remapped.

One key would still be missing. I would sacrifice right Control or right Shift, wiring one of them to be a clone of its corresponding left one (that is, the system would no longer know the difference between the right and left version of the remapped key).

If you need only Home, rewiring it to, say, right Shift would not even require a Japanese keyboard controller.

To make this possible, it would be necessary to find a way to reassemble the keyboard after disassembling it (they are not meant to be serviced; once opened, they can't be reassembled without using bolts or glue, which would be difficult), and to make a custom membrane to implement the remapping. It would also require soldering of a Japanese keyboard controller into say a US keyboard. Not an easy task.


Top
 Profile  
 
PostPosted: Mon Sep 30, 2013 12:07 am 
Offline
Senior ThinkPadder
Senior ThinkPadder

Joined: Sat Oct 29, 2005 6:20 am
Posts: 5526
Location: Israel
PowerPC wrote:
The keyboard probably is not too "dumb". The BIOS can identify the different keyboard layouts: English, French, Japanese, etc.
I thought about it, but really all the layouts are the same, except some have extra keys on their matrix. The BIOS can recognize those extra keys. In layouts where they are missing, there are just less cells in the matrix, and their codes are never produced.

Since there are no keys being moved around or replaced in the different layouts, just extra keys added, it's not a problem for the same BIOS to support all. But physically different layouts cannot be done natively without some BIOS switch or a different BIOS.

PowerPC wrote:
A Japanese keyboard has 4 extra keys that do not exist in other languages. If I would heavily modify a keyboard, so that I could remap the matrix, I would use a Japanese keyboard controller, and map the four of the five missing keys to the extra Japanese ones. They would still generate wrong scan codes, but those then could be remapped.

One key would still be missing. I would sacrifice right Control or right Shift, wiring one of them to be a clone of its corresponding left one (that is, the system would no longer know the difference between the right and left version of the remapped key).
And the purpose of all this fiddling would be what?

The problem everyone is complaining about is not that the keys are not present, but that they are in the wrong locations. You cannot solve that with remapping. What exactly are you trying to achieve?

PowerPC wrote:
To make this possible, it would be necessary to find a way to reassemble the keyboard after disassembling it (they are not meant to be serviced; once opened, they can't be reassembled without using bolts or glue, which would be difficult), and to make a custom membrane to implement the remapping. It would also require soldering of a Japanese keyboard controller into say a US keyboard. Not an easy task.
I still think these keyboards are passive, and there is no "Japanese" keyboard controller.

_________________
Current: X220 4291-4BG, T410 2537-R46, T60 1952-F76, T60 2007-QPG, T42 2373-F7G, X61 7673-V2V
Collectibles: X32 w/ IPS Screen, A31p w/ Ultrabay Numpad
Past: Z61t 9440-A23, T60 2623-D3U, X32 2884-M5U


Top
 Profile  
 
PostPosted: Mon Sep 30, 2013 12:29 am 
Offline
Freshman Member

Joined: Thu Apr 04, 2013 11:33 pm
Posts: 109
Location: Alvorada, RS, Brazil
dr_st wrote:
And the purpose of all this fiddling would be what?

The problem everyone is complaining about is not that the keys are not present, but that they are in the wrong locations. You cannot solve that with remapping. What exactly are you trying to achieve?


I'm trying to find a way to make the five keys that do not generate scan codes to generate something that can be remapped by software.

dr_st wrote:
I still think these keyboards are passive, and there is no "Japanese" keyboard controller.


That would make things way easier. Only a custom membrane would be required. You could fix the position of Home, End, Insert, Delete, Page Up and Page Down. And hardwire the non working keys into the matrix positions of the extra keys in a Japanese keyboard.


Top
 Profile  
 
PostPosted: Mon Sep 30, 2013 6:52 am 
Offline
Senior ThinkPadder
Senior ThinkPadder

Joined: Sat Oct 29, 2005 6:20 am
Posts: 5526
Location: Israel
I see. That does seem an interesting approach. :)

_________________
Current: X220 4291-4BG, T410 2537-R46, T60 1952-F76, T60 2007-QPG, T42 2373-F7G, X61 7673-V2V
Collectibles: X32 w/ IPS Screen, A31p w/ Ultrabay Numpad
Past: Z61t 9440-A23, T60 2623-D3U, X32 2884-M5U


Top
 Profile  
 
PostPosted: Sun Oct 06, 2013 9:25 am 
Offline

Joined: Sun Oct 06, 2013 9:12 am
Posts: 1
Location: Frankfurt, Germany
I've just hacked my thinpad t430s:
bought a keybpoard for the t420s and rewired two keys with silver color.
Then cut open the 'page forward', 'page backward' keys next to the cursor keys. (they had been used for the first and insert keys).
Now I have at least the basic keys (insert, delete, page up/down, fist, last) beeing recognized by the bios. Next step is remapping them in the operating system.

:mrgreen:

Will inform you, when the surrounding bezel has arrived (shipment from hong kong to germany...) and everything is built up.

Image
Image


Top
 Profile  
 
PostPosted: Sun Oct 06, 2013 10:01 am 
Offline
Freshman Member

Joined: Thu Apr 04, 2013 11:33 pm
Posts: 109
Location: Alvorada, RS, Brazil
Please remember to coat the traces you did with conductive ink so that nothing will be shorted.

Very nice idea. I own a T60 and a TransNote, an A31p is in transit to my home.

I only did a minor mod to my keyboard. I got a T4x keyboard and a T6x one. Both old Chicony (FRUs 39T0581 and 39T7178). You need to transplant the T4x scissors to the T6x keyboard. You need to bend the metal clips in the T6x keyboard a little so that the T4x scissors will fit, because they are slightly bigger. Caps Lock required some minor filing to fit. I transplanted Caps Lock and the gray keys.

I thought the mouse buttons were too "soft", so I also transplanted the rubber cups from an NMB keyboard, only for the mouse buttons.

This is the result:
Image


Top
 Profile  
 
PostPosted: Fri Nov 15, 2013 3:10 am 
Offline

Joined: Mon Apr 29, 2013 5:17 pm
Posts: 5
Location: Acqui Terme, Italy
@hamiller hi :)
Do you have any updates about the keyboard modding?

_________________
Current: Thinkpad X220 (4286-CTO): i7 cpu, 8gb ram, 128ssd + 320hdd, TP BT mouse
Retired: X32, X61, X61s


Top
 Profile  
 
PostPosted: Sun Dec 08, 2013 5:02 am 
Offline

Joined: Fri Dec 06, 2013 10:20 am
Posts: 2
Location: Manchester, UK
I bought a X220i keyboard off e-bay and plugged it into my X230. The main difference seemed to be the notches to hold the keyboard into the palmrest are thinner on the X230, but was easy enough to cut them down to size. Fitted fine and all seemed to be well (beyond the keys which the BIOS doesn't know about).

However, after doing all this and fitting it nicely I noticed the trackpoint buttons don't work :( Should they work, and I bought a broken keyboard / broke it during my butchering, or will the trackpoint buttons never work?

If they do I might get another keyboard and give it another go. With some key remapping the X230 keyboard isn't so bad, but switching between the X230 and X201s is quite annoying.


Top
 Profile  
 
PostPosted: Sat Mar 08, 2014 4:38 pm 
Offline

Joined: Wed Nov 28, 2012 11:40 am
Posts: 1
Location: Toronto, Canada
hamiller: looking at X220 keyboard assembly it seems like one has to break a few plastic holders to remove the upper part to get to the layer which has the wires - did you reassemble the keyboard (and how?), does it hold together fine/firmly after that? Thanks


Top
 Profile  
 
PostPosted: Tue Mar 18, 2014 12:42 pm 
Offline
Freshman Member

Joined: Thu Apr 04, 2013 11:33 pm
Posts: 109
Location: Alvorada, RS, Brazil
I do not own an X230, but something relevant came to my attention.

The open source project coreboot now supports the X230.

http://www.coreboot.org/Board:lenovo/x230

From the home page of the project:

Quote:
coreboot is a Free Software project aimed at replacing the proprietary BIOS (firmware) found in most computers. coreboot performs a little bit of hardware initialization and then executes additional boot logic, called a payload.


Top
 Profile  
 
PostPosted: Tue Mar 18, 2014 1:06 pm 
Offline

Joined: Fri Dec 06, 2013 10:20 am
Posts: 2
Location: Manchester, UK
Yup, coreboot supports X201 and X230, but for both they haven't touched the embedded controller firmware. I assume that this is what will be controlling the key mappings. There doesn't seem to be any keyboard-mapping-related code in the patches for coreboot anyway.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group