PDA

View Full Version : Disable or re-map Hot-Key? [Resolved]


Jagdpanther
August 19th, 2007, 12:43 PM
How do I disable or re-map hot-keys? I have accidentally pressed the 'e' key ... I really just want to disable the 'e'.

Endoperez
August 19th, 2007, 02:23 PM
Impossible AFAIK.

Jazzepi
August 19th, 2007, 02:25 PM
1. Find a flat, metallic object. A butter knife will do well.
2. Pry up the E key.
3. Pry up any other key of the same size.
4. Interchange said keys.

Viola! You are done.

Jazzepi

Jagdpanther
August 19th, 2007, 08:06 PM
Because this really was bugging me and physically changeing the keys wouldn't help :-) (I don't look at my keyboard enough, that is the real problem) here is a cheesy hack that will re-map your 'e' key to 'r' ... so if you press 'e' you get the recruitment page. 'Cheesy' because it re-maps your entire XWindows session.

This only works on Linux ...

Script 1, change 'e' to 'r'

no_e_key.bash:

#!/bin/bash
xmodmap -e "keycode 26 = 0x0072" # make e --> r


And when you want your 'e' back:

yes_e_key.bash:

#!/bin/bash
xmodmap -e "keycode 26 = 0x0065" # make e --> e


Also, if you logout of your XWindows session the original settings will be back.

Gandalf Parker
August 19th, 2007, 08:38 PM
You could always include it in your xwindows startup script.

Yay! Another reason that Linux rules. http://forum.shrapnelgames.com/images/smilies/happy.gif
I would have been really surprisd if there was no way to do it in linux.

WARNING: Do not use Linux if you want to be able to ask a question and get an answer how to do it. Use Linux if you want to ask a question and get a hundred different answers on how to do it.

NTJedi
August 19th, 2007, 10:05 PM
Use remapkey.exe for any systems using a Microsoft operating system. Very easy to use and no editing of the registry or yanking out keys from the keyboard.

Fun tool to play a trick on your friends too.

Hadrian_II
August 20th, 2007, 08:24 AM
Gandalf Parker said:
You could always include it in your xwindows startup script.




I think this would be to agressive, but just create a dom3 startscript with it.

something like this:

#!/bin/bash
xmodmap -e "keycode 26 = 0x0072" # make e --> r
./dom3_x86 #here you need the right path
read # just that it waits after the game started
xmodmap -e "keycode 26 = 0x0065" # make e --> e

Jagdpanther
August 20th, 2007, 07:41 PM
Hadrian_II, I like that script. I think I'll call it 'dom' and be happy about not accidentally moving on to the next turn.

FYI if you want a key other than 'r' remapped try the following command:

xmodmap -pk

Then substitute the Keysym value of the key you want ...

Baalz
August 21st, 2007, 04:27 PM
Lol, srrms likr this would makr in-gamr messagrs a bit odd. Hoprfully you can still typr your password...;)

NTJedi
August 21st, 2007, 09:31 PM
Baalz said:
Lol, srrms likr this would makr in-gamr messagrs a bit odd. Hoprfully you can still typr your password...;)



That's why with Windows it's easier to use remapkey.exe and have the 'end' key be switched with 'e' key. All you have to remember is the end key is for 'e' within messages and the end key will end your turn.
http://forum.shrapnelgames.com/images/smilies/happy.gif

Jagdpanther
August 26th, 2007, 12:16 AM
Here is the Linux bash script to change
e --> r # so no accidental end of turn
end --> e # press end to end turn or 'e'for other apps
run dominions 3
when dominions 3 exits change keys back:

---------------------
<font class="small">Code:</font><hr /><pre>#!/bin/bash

xmodmap -e "keycode 26 = 0x0072" # make e --&gt; r
xmodmap -e "keycode 103 = 0x0065" # make end --&gt; e
dom3 # you might need full path
xmodmap -e "keycode 26 = 0x0065" # make e --&gt; e
xmodmap -e "keycode 103 = 0xff57" # make end --&gt; end
</pre><hr />
------------------