Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2007-11-05 11:46:55 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Keyboard Right Shift key in wrong place

Those of us who are used to using a N.American desktop keyboard with the right-hand Shift key beside the / key are likely finding it a bit of a challenge to adapt to the EeePC's layout which places that Shift key to the right of the Up Arrow key.  I'd actually like to see the following layout:
/  Shift  Up
Left Right Down

Any suggestions on a keystroke modifier program that could accomplish this?

thanks
S


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#2 2007-11-06 3:18:17 am

vmlinuz
New member
Registered: 2007-11-05
Posts: 3

Re: Keyboard Right Shift key in wrong place

This just swaps the Up and shift keys around, not the Right and Down keys - but the principle is the same there anyway...

Code:

xmodmap -e "keycode 62 = Up" # Make the shift key go up
xmodmap -e "keycode 98 = Shift_R" # Make the up key into shift
xmodmap -e "add shift = Shift_R" # Make the new shift key actually do shifting
xmodmap -e "remove shift = Up" # Stop the old shift key from shifting
xset r 62 # Make the new Up key autorepeat
#xset -r 98 # Make the new shift key not autorepeat, if you want

Last edited by vmlinuz (2007-11-06 3:19:14 am)

Offline

 

#3 2007-11-06 3:33:46 pm

TheBronze
Senior Member
Registered: 2007-10-29
Posts: 239

Re: Keyboard Right Shift key in wrong place

Strangely, I am not finding any issues with the location of the shift key. I don't care for the tight location of the space bar though.

now, a real trick if you get the mapping changed over to your preference would be to remove the shift key and the arrow key and swap them. Might want to re-map the PgUp function as well though.

Offline

 

#4 2007-11-06 6:39:23 pm

TacticalPenguin
Senior Member
From: Near an EEE
Registered: 2007-10-05
Posts: 639
Website

Re: Keyboard Right Shift key in wrong place

I never use the right shift key, always the left. I don't know why either.


EEE Fund: Who cares I finally got it 4/16/08
I got an eee after creating the "post here when you get your eee" thread, which had over 1450 posts in it, making it the forum's largest, before I could post in it. Also, XP SP3 + 8GB transcend SDHC card + 405-999mhz eeectl

Offline

 

#5 2007-11-06 11:49:19 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

vmlinuz wrote:

This just swaps the Up and shift keys around, not the Right and Down keys - but the principle is the same there anyway...

vmlinuz, you are DA MAN!  I knew there had to be a way (this is linux after all), but didn't remember where to look. thanks for saving me the effort of hunting down the answer. I suspect that this info will be useful to many others as well.

I put your code into a file called swapshift.sh, then made it executable:

Code:

chmod 0755 swapshift.sh

Then, to execute that script (for you linux noobs), I ensured that I specified the path name (I recall being very frustrated when I first learned that Linux couldn't find an executable right in front of its nose unless you prefixed it with a ./ ):

Code:

./swapshift.sh

Will I need to run this script each time I reboot the machine? I guess I'll learn soon enough.   If that's required, I will likely be able to simply add it to the end of the /etc/rc.local file.

By the way, to physically switch the keys, lift up very gently on the LEFT side of the key with a paring knife or something similar, and gently press down in the new location until it snaps into place.

One more thing: I also want to switch the Right/End and Down/PgDn keys so the whole area there looks more symmetric: the bottom-right end of the keyboard will then look like this:

       ?/            Shift             Up/PgUp
Left/Home    Right/End    Down/PgDn

It makes more sense for L and R to be beside each other, and Up and Down to be one above/below the other.  To find out how to do that, I used the xev program which you can launch from the Terminal. It will tell you what keycode is being generated by each key. For example if you press the unadjusted Down key, you will see that it generates keycode 104. You can then tell xmodmap that it should treat keycode 104 as a Right.

I saved the following commands into a script called swapend.sh

Code:

xmodmap -e "keycode 104 = Right" # Make the down key go Right not Down
xmodmap -e "keycode 105 = End" # make Fn Dn go End (Next) not Pg Dn
xmodmap -e "keycode 102 = Down" # make Right go Dn
xmodmap -e "keycode 103 = Next" # make Fn Right (End) go Pg Pn (Next)

Last thing, your suggested script does swap the Shift and Up keys, but of course we also have to consider the PgUp key, which is accessed by using Fn Up. I need to add the following lines to your script:

Code:

xmodmap -e "keycode 109 = Prior" # Make the Shift-shift key go PgUp
xmodmap -e "keycode 99 = Control_R" # Make the PgUp key go Shift-shift

[update]: Here's what the final keyboard layout looks like:
http://farm3.static.flickr.com/2288/1898345007_b9d26fcabc.jpg

Last edited by midtoad (2007-11-07 1:45:47 pm)


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#6 2007-11-07 1:43:05 pm

Tpunk
Member
From: Orlando, FL USA
Registered: 2007-10-23
Posts: 85

Re: Keyboard Right Shift key in wrong place

Perfect, I was wondering if someone would find a way to fix this. It really does suck in the stock location.


EEE-PC 4G with 2G Transcend ram and a 16G Transcend SDHC card running Windows XP.

Offline

 

#7 2007-11-07 6:14:22 pm

giltwist
Member
From: Pennsylvania
Registered: 2007-10-30
Posts: 23
Website

Re: Keyboard Right Shift key in wrong place

I put all of these into a single shell script and it worked great.  Now I won't mess up every time i try to type a question mark.

Offline

 

#8 2007-11-09 12:39:44 pm

giltwist
Member
From: Pennsylvania
Registered: 2007-10-30
Posts: 23
Website

Re: Keyboard Right Shift key in wrong place

FYI, this script does not work after a reboot for me.  I'm gonna have to get this script to run at startup.

Offline

 

#9 2007-11-09 12:45:13 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

@giltwist, I put a link to my script in my /etc/rc.local file so it would run on boot.  Anything in rc.local is supposed to run each time you boot.  But for some reason that's not happening and I haven't had time yet to figure out why.  So, each time I reboot, I open a terminal and re-run the script.   A bit inconvenient, but it works.


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#10 2007-11-09 11:24:05 pm

vmlinuz
New member
Registered: 2007-11-05
Posts: 3

Re: Keyboard Right Shift key in wrong place

Sorry about the absence, folks...

I did know that Fn+key is showing as a different key, rather than a modified key, so yes, that needs remapping as well.

The reason it doesn't work in the rc.local file is that it has to run *after* X has started, but within the X environment.  The right place to put it is probably the /etc/X11/Xsession.d directory.

I'm not actually using this mapping, but my fingers are starting to get confused - got one keymap on my work laptop (which stays on my desk at the office), one on my main home machine, and one on the Eee smile

Offline

 

#11 2007-11-09 11:34:25 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

vmlinuz wrote:

The reason it doesn't work in the rc.local file is that it has to run *after* X has started, but within the X environment.  The right place to put it is probably the /etc/X11/Xsession.d directory.

Hey, that's right! Good tip, I should have thought of that. I thought that it should go in rc.local since I want the change to take effect even when using Terminal, but now that I think about it, that Terminal is being launched from X and I never actually get to a normal tty session.  I'll try the change tomorrow.

[update]: putting the script in /etc/X11/Xsession.d directory is NOT the thing to do. It caused X to crash, then the machine to reboot, ad infinitum.   I had to resort to booting in single-user mode (see wiki) in order to remove the offending shortcut.

Last edited by midtoad (2007-11-14 11:48:54 am)


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#12 2007-11-14 10:12:29 am

giltwist
Member
From: Pennsylvania
Registered: 2007-10-30
Posts: 23
Website

Re: Keyboard Right Shift key in wrong place

I got this to work at startup.  What I did was save the script to

/home/user/.kde/Autostart


I

Offline

 

#13 2007-11-15 12:55:44 am

beadopapa
New member
Registered: 2007-11-15
Posts: 6

Re: Keyboard Right Shift key in wrong place

can some please write a walkthru for this? or at least inform where i can edit the file? im  a total linux noob.

the right shift placement is a real issue for me. for now i have to completely abandon the use of right shift coz of that.

Offline

 

#14 2007-11-15 1:22:00 am

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

beadopapa wrote:

can some please write a walkthru for this? or at least inform where i can edit the file? im  a total linux noob.

the right shift placement is a real issue for me. for now i have to completely abandon the use of right shift coz of that.

I'll probably put the instructions into a wiki posting.   I assume you know how to run the text editor. Just create a file somewhere, say in your home directory, called setupkbd.sh.  Into it put this content:

script below corrected November 21 11:17

Code:

#set up keyboard to exchange the Shift and Up keys, and the Down and Right keys
xmodmap -e "keycode 62 = Up" # Make the Shift key go Up
xmodmap -e "keycode 109 = Prior" # Make the Shift-shift key go PgUp
xmodmap -e "keycode 98 = Shift_R" # Make thh Up key go Shift
xmodmap -e "keycode 99 = Control_R" # Make the PgUp key go Shift-shift
xmodmap -e "add shift = Shift_R" # Make the new shift key actually do shifting
xset r 62 # Make the new Up key autorepeat
xset -r 98 # Prevent the new Shift key from autorepeating
#
xmodmap -e "keycode 104 = Right" # Make the down key go Right not Down
xmodmap -e "keycode 105 = End" # make Fn Dn go End (Next) not Pg Dn
xmodmap -e "keycode 102 = Down" # make Right go Dn
xmodmap -e "keycode 103 = Next" # make Fn Right (End) go Pg Pn (Next)
#
echo "All Done setting up keyboard."

Now you've got a list of instructions, but you have to make that file executable.  to do this you need to open a Terminal window (use Ctrl-Alt-T in Easy Mode).  You'll see an indicator of which folder you're in:
/home/user>

check to see if your file is there:
ls -l setupkbd.sh
You should see something like:
-rw-r--r-- user user 988 2007-11-14 09:53 setupkbd.sh
(there are 3 sets of permissions: read, write, execute for owner, group, rest of world; the above file is read/write for owner, read-only for the group, read-only for world)

Now to make it executable, type:
chmod 0755 setupkbd.sh
Now you can check its permissions again with
ls -l setupkbd.sh
You should see something like this now:
-rwxr-xr-x user user 988 2007-11-14 09:53 setupkbd.sh
(the x's tell you that the file is now executable).

to execute this file, type:
./setupkbd.sh
the dot-slash says that the file is in the current directory.

If that works, then follow the rest of the instructions in the thread for moving the keycaps. 

At the moment you'll have to execute (run) this file each time you restart the Eee PC; I'm trying to figure out how to get it to run automatically.

Last edited by midtoad (2007-11-21 1:17:56 pm)


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#15 2007-11-15 8:56:20 am

giltwist
Member
From: Pennsylvania
Registered: 2007-10-30
Posts: 23
Website

Re: Keyboard Right Shift key in wrong place

Well, for full (KDE) mode, just save the script to

/home/user/.kde/Autostart

However, this does not seem to be working in Easy Mode

Offline

 

#16 2007-11-15 9:57:19 am

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

giltwist wrote:

Well, for full (KDE) mode, just save the script to

/home/user/.kde/Autostart

However, this does not seem to be working in Easy Mode

I put a shortcut to the script there, and what happens is that it gets opened in text editor. Bizarre.

As for Easy Mode, it doesn't run KDE. Instead, it runs IceWM. So we should put it somewhere appropriate for that window manager.


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#17 2007-11-15 11:05:21 am

giltwist
Member
From: Pennsylvania
Registered: 2007-10-30
Posts: 23
Website

Re: Keyboard Right Shift key in wrong place

Midtoad,

OH! I know what you are doing wrong.  You forgot to give it execute permission.  Assuming your script is named "swapkeys.sh" and is in the Autostart folder, type this

Code:

chmod 705 /home/user/.kde/Autostart/swapkeys.sh

Offline

 

#18 2007-11-15 12:02:09 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

giltwist wrote:

Midtoad,

OH! I know what you are doing wrong.  You forgot to give it execute permission.

Well certainly that would be a reason for a script failing to execute. But not in this case.  My script already has execute permission since I run it by hand on every boot.

Rather than put a copy of the script in the Autostart folder, I created a symbolic link to the actual script which resides elsewhere.  For some reason the Autostart folder may then see this reference to the script name and just load it into the editor rather than executing it.

What I've done now is to create a new script in the Autostart folder that explicitly executes my other script:

Code:

exec /home/user/scripts/setupkbd.sh > null

Ok, that doesn't work either. The file still gets opened in Text Editor.  Here is the solution: you need to explicitly tell the OS to call the shell to execute the contents of the file. So insert the following at the top of the script:

Code:

#!/bin/bash

Tested, and it works. Now my keyboard is properly set up automatically after every reboot (into Advanced Mode).

For automatic startup in Easy Mode, which uses IceWM for its Window Manager instead of KDE, see this wiki how-to I prepared: http://wiki.eeeuser.com/howto:startupscript

Last edited by midtoad (2007-11-21 12:22:04 am)


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#19 2007-11-15 3:19:09 pm

Krellan
Member
Registered: 2007-11-11
Posts: 38

Re: Keyboard Right Shift key in wrong place

midtoad wrote:

For automatic startup in Easy Mode, which uses IceWM for its Window Manager instead of KDE, .... I'm still working on it.

I've stumbled across something that might work for automatic startup in Easy mode.  It was for trying to solve another keyboard issue in another post (I needed the Caps Lock key to become Control instead).

http://forum.eeeuser.com/viewtopic.php?pid=22537

Offline

 

#20 2007-11-20 10:27:22 pm

C.J.
Senior Member
From: Ottawa, Canada
Registered: 2007-11-20
Posts: 148

Re: Keyboard Right Shift key in wrong place

GREAT idea... only partially working for me.

I created setupkbd.sh in the Autostart directory and it only remaps the right arrow and down arrow. The SHIFT and UP seem to be in the original positions.

I've copied the script exactly as midtoad wrote it.

Help?

Offline

 

#21 2007-11-20 11:02:31 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

@CJ, are you using Advanced Mode or Easy Mode?   If the latter, you need to create an executable file in your /home/user/.icewm directory called startup and put your script in there. BTW I've written a wiki entry on this topic: http://wiki.eeeuser.com/howto:moveshiftkey

Last edited by midtoad (2007-11-21 12:33:57 am)


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#22 2007-11-21 12:37:05 pm

C.J.
Senior Member
From: Ottawa, Canada
Registered: 2007-11-20
Posts: 148

Re: Keyboard Right Shift key in wrong place

Thanks for the note midtoad. Your wiki's are fantastic. smile

I'm actually using Advanced Mode with the full desktop.

The script *partially* works - two of the keys change position - but the shift and up don't, which is why I'm completely confused.

Offline

 

#23 2007-11-21 1:12:42 pm

midtoad
Senior Member
From: Calgary, Canada
Registered: 2007-11-03
Posts: 210
Website

Re: Keyboard Right Shift key in wrong place

@CJ, what keyboard layout do you have? qwerty? azerty? What keyboard map are you using? US > Basic, or US > Intl? What keyboard definition are you using? 105 keys?

If you are not using US keyboard map, the actual keycodes emitted by your keys will be different from mine, and you will need to alter your setupkbd.sh. 

Check your keycode definitions using xev, which you should start from the Terminal.  This is a graphical app that traps and records all keyboard and mouse events.  Position your mouse on the red X icon that closes the window (so you won't have to move the mouse again once you start typing), then press the Up key.  When I do this, I get the following:

Code:

KeyPress event, serial 27, synthetic NO, window 0x20000001,
   root 0x69, subw 0x0, time 1692086123, (-8,26), root:(488,56),
   state 0x0, [b]keycode 98 (keysym 0xffe2, Shift_R)[/b], same_screen YES,
   XLookupString gives 0 bytes:
   XmbLookupString gives 0 bytes:
   XFilterEvent returns: False

Note the part in bold. That's saying that when I press the Up key (i.e. the key next to the / key), it returns keycode 98, and it also tells me that 98 corresponds to Shift_R). Well yes, that's because the script is working for me.  You should still get keycode 98 but the corresponding text description should say Up.  If you don't see that, you should edit your script.

Wait a second... I see that the script I posted contains two copies of the mods to make for swapping the Down and Right keys, but none for the Shift and Up keys. I'll edit that post and also post the correction to the wiki. Sorry for the inconvenience!


EeePC 4G 701 running Eeebuntu 2.0 NBR, with Apple wireless keyboard, Cirago Bluetooth mini-dongle

Offline

 

#24 2007-11-21 4:34:30 pm

C.J.
Senior Member
From: Ottawa, Canada
Registered: 2007-11-20
Posts: 148

Re: Keyboard Right Shift key in wrong place

EDIT 2: I've reconfigured two Eee PC's now, both working with the reconfigured keyboard in Basic and Advanced desktop modes.

I don't have the EeePC in front of me but I believe I'm using the same keyboard layout you are - QWERTY US-English. I'll try updating the script based on your latest changes and post back with results! smile

Last edited by C.J. (2007-11-25 5:58:56 pm)

Offline

 

#25 2007-11-25 5:31:49 pm

NoeeePC4MeWellMaybe...
Senior Member
Registered: 2007-09-22
Posts: 230

Re: Keyboard Right Shift key in wrong place

midtoad wrote:

@CJ, are you using Advanced Mode or Easy Mode?   If the latter, you need to create an executable file in your /home/user/.icewm directory called startup and put your script in there. BTW I've written a wiki entry on this topic: http://wiki.eeeuser.com/howto:moveshiftkey

The icewm startup script is designed to be executed by icewm-session. So in Easy Mode, an alternative and possibly more 'official' (yet less practical) method to get the startup script to work would be to open the '/usr/bin/startsimple.sh' script and replace:

Code:

icewmtray &

With

Code:

#icewmtray &

And

Code:

exec icewm

With

Code:

#exec icewm
exec icewm-session

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson