How do I remap the keys on my keyboard?

19

3

I broke my laptop and had to buy a new one with a new keyboard that I am struggling to get familiar with, especially with the keys like home, page-up, page-down and end, which aren't standardized at all.

I found myself doing this for like the 5th time in the last several years, and I think it is really annoying.

Is there an app that can reliably map one key to another? By reliably I mean that key mapping works with Shift, Alt, and other modifiers.

UPDATE

Windows 7, Samsung Chronos 7

Trident D'Gao

Posted 2012-07-15T00:05:36.943

Reputation: 519

Question was closed 2016-07-19T13:47:01.590

Hmm, this is offtopic for Serverfault. Perhaps Superuser will be more helpful? – cjc – 2012-07-15T00:12:43.907

It would also really help to include information about the OS, applications, etc... anything relevant, else answers would just be guesses. – jscott – 2012-07-15T00:14:13.870

just did, check it out – Trident D'Gao – 2012-07-15T00:18:03.667

What about the original key, do you want them to remain as is or be swapped with the target key? – Synetech – 2012-07-15T00:38:47.270

Almost, in the sense that there can be more than 2 keys involved into swap. Consider swapping the home/end/page up/page down keys in an arbitrary order. – Trident D'Gao – 2012-07-15T02:49:19.227

Answers

8

Microsoft Keyboard Layout Creator is an excellent tool for creating custom keyboard mappings.

The Microsoft Keyboard Layout Creator (MSKLC) extends the international functionality of Windows 2000, Windows XP, Windows Server 2003, Windows Vista, and Windows 7 systems by allowing users to:

  • Create new keyboard layouts from scratch
  • Base a new layout on an existing one
  • Modify an existing keyboard layout and build a new layout from it
  • Multilingual input locales within edit control fields
  • Build keyboard layout DLLs for x86, x64, and IA64 platforms
  • Package the resulting keyboard layouts for subsequent delivery and installation

Will

Posted 2012-07-15T00:05:36.943

Reputation: 129

This is utterly useless. It can't remap the entire keyboard. – LtWorf – 2016-07-23T14:13:48.753

Actually you can remap all keys, including the modifier keys. With a hack you can edit the klc files and change VK code of most of keys. See this link: https://forum.colemak.com/topic/870-hacked-msklc-to-enable-remapping-capslock/

– WesternGun – 2017-06-03T18:02:49.980

What is "this"? Please edit your question to provide more context. – iglvzx – 2012-07-15T06:55:30.840

All you need to do is click the link, it's pretty self-explanatory for there on in. – Will – 2012-07-15T06:56:48.437

12

Yes, I know. But think about it this way: if the link stops working (i.e. link rot), your answer is no help. You can't google "this" and find more information on the tool you suggested. :)

– iglvzx – 2012-07-15T07:04:03.000

3This app is not an option for Dell laptop with Windows 7. It cannot map Page Up/Down and Shift keys :-( – Andrii Muzychuk – 2014-01-16T12:24:11.110

5

There is an excellent tool for remapping keys for Windows Platform known as SharpKeys.

Sharpkeys is supported on Windows XP/2003/2000/Vista/7.

Another software is KeyTweak.

Abhijeet Kasurde

Posted 2012-07-15T00:05:36.943

Reputation: 163

Sharpkeys allows us to tweak caps/shift/ctrl keys, when Microsoft Keyboard Layout Creator says they are unassignable. – Hugo H – 2016-07-31T16:28:55.567

As of 2016-12-22 SharpKeys is reported as having a virus by both Chrome and Firefox running on a Win7 laptop. – Peter Rowell – 2016-12-23T03:47:14.577

4

Try AutoHotkey. Its configuration syntax isn't the greatest, but it's very flexible.

Fran

Posted 2012-07-15T00:05:36.943

Reputation: 4 774

The syntax for this particular purpose is really simple: just one line Capslock::Ctrl makes Capslock become a Control key. Here is the doc: https://autohotkey.com/docs/misc/Remap.htm

– user – 2016-04-16T10:26:33.063

And, in contrast to SharpKeys and KeyTweak, no reboot is needed. – user – 2016-04-16T10:34:47.050

I am sorry I am not a hell of a programmer, how do I map the "page down" to the "end" key? – Trident D'Gao – 2012-07-15T01:06:16.680

1Read the documentation around Send, specifically {PgDn} and {End}. – None – 2012-07-15T04:35:23.467

2

If you are just mapping one key to another, you don't need the Send command. See this related question and its answer: http://superuser.com/questions/430906/can-i-interchange-my-home-end-keys-with-pageup-pagedown-keys-on-dell-latit

– iglvzx – 2012-07-15T07:28:45.397

2

For Mac OS X, Karabiner is a great remapping tool that enables you to create profiles for different keyboards and layouts. For Windows, there are many good remapping tools, such as AutoHotKey, hotkeycontrol, KeyMapper, keyremapper, KeyTweak, klm2000, MSKLC, and sharpkeys.

However, my own preference is ATNsoft Key Manager, which is highly intuitive and powerful. With Key Manager, you can create profiles for different keyboards and layouts. It does not make changes to the Windows Registry, and you can change profiles without logging out or rebooting. It even allows you to create a Fn key, which I have used extensively in my profile of a KBP V60 keyboard remapped to a HHKB/Mac layout under Windows 8.1.

Hypersphere

Posted 2012-07-15T00:05:36.943

Reputation: 21

0

http://www.autohotkey.com/ can is a powerful solution. You can remap keys and create modifiers keys using scripts like

;Use Capslock as a modifier and not as capslock anymore
$*Capslock::
    Gui, 99:+ToolWindow
    Gui, 99:Show, x-1 w1 +NoActivate, Capslock Is Down
    keywait, Capslock
    Gui, 99:Destroy
    return

;Write functions for keys while capslock is beeing hold here
#IfWinExist, Capslock Is Down
    y::Home
    u::PgDown
    i::PgUp
    o::End
    j::Down
    k::Up
    l::Right
    h::Left
    d::Delete
#IfWinExist

;Use right and left shifts to toggle capslock
RShift & LShift::
    SetCapsLockState, % (State:=!State) ? "On" : "Off"
    return

LShift & RShift::
    SetCapsLockState, % (State:=!State) ? "On" : "Off"
    return

Jp_

Posted 2012-07-15T00:05:36.943

Reputation: 329

There shouldn't be a + before NoActivate – Born2Smile – 2016-11-01T21:14:23.867