Re-map build key (and other locked keys)
-
- Greenhorn
- Posts: 6
- Joined: 31 Dec 2009, 10:39
- Contact:
Re-map build key (and other locked keys)
I have a laptop which requires you to hold down a modifier key to activate the function keys (F1, etc. only work if I hold down 'fn'), which makes it rather awkward when I want to issue a quick build order with F3. I've tried to change the build key, but it appears to be locked in the key map options (marked with a red background, clicking it has no effect besides making an error noise). I vaguely remember reading somewhere that this was done deliberately to make sure that people didn't change commonly used keys. However, since I'm the only one using this computer, I was wondering if I could override this. Is this possible?
*end of message*
-
- Inactive
- Posts: 1695
- Joined: 01 Sep 2006, 19:17
Re: Re-map build key (and other locked keys)
In the six lines at http://developer.wz2100.net/browser/bra ... map.c#L295, change KEYMAP_ALWAYS_PROCESS to KEYMAP_ASSIGNABLE and recompile the game (you probably need to reset your keymap after that).
Re: Re-map build key (and other locked keys)
It might be easier to change your keyboard options. I used to have a laptop running Windows XP that had a feature to switch the way the function keys work. Now I have a Mac 10.5 laptop that allows you to switch the function keys too.
If you have a Mac go to System Preferences and choose Keyboard & Mouse. Check the checkbox that says "Use all F1, F2, etc. keys as standard function keys".
If you have a Mac go to System Preferences and choose Keyboard & Mouse. Check the checkbox that says "Use all F1, F2, etc. keys as standard function keys".
Re: Re-map build key (and other locked keys)
Note, they were hardcoded that way for a reason, since the tooltips are hardcoded.cybersphinx wrote:In the six lines at http://developer.wz2100.net/browser/bra ... map.c#L295, change KEYMAP_ALWAYS_PROCESS to KEYMAP_ASSIGNABLE and recompile the game (you probably need to reset your keymap after that).
and it ends here.
-
- Greenhorn
- Posts: 6
- Joined: 31 Dec 2009, 10:39
- Contact:
Re: Re-map build key (and other locked keys)
Works as advertised! Thanks!cybersphinx wrote:In the six lines at http://developer.wz2100.net/browser/bra ... map.c#L295, change KEYMAP_ALWAYS_PROCESS to KEYMAP_ASSIGNABLE and recompile the game (you probably need to reset your keymap after that).
Unfortunately I can only disable the keys' special functions, I can't set them to trigger F(x) directly.digt wrote:It might be easier to change your keyboard options. I used to have a laptop running Windows XP that had a feature to switch the way the function keys work. Now I have a Mac 10.5 laptop that allows you to switch the function keys too.
If you have a Mac go to System Preferences and choose Keyboard & Mouse. Check the checkbox that says "Use all F1, F2, etc. keys as standard function keys".
- Attachments
-
- warzone2100-2.3.4-unlock_keys.patch
- Patch for future reference
- (2.23 KiB) Downloaded 225 times
*end of message*