Key Code Checker for Windows?

I use synergy for sharing keyboard/mouse on my mac/pc.

I need to switch the alt(option) key mapping to meta, and I need some tool if this works.

What kind of tool is used for checking the key code that is send when I hit the key?

4 Answers

You can simply create a HTML to do so.

  1. Copy & paste the following code into a new HTML file, say keycode.html.
  2. Open it with a browser.
  3. Press a key. A prompt with key code would appear.

<html>

<script>
document.onkeydown = function(e) {
    if (!e) var e = window.event;
    if (e.keyCode) keycode = e.keyCode;
    else if (e.which) keycode = e.which;
    alert(keycode);
}
</script>

<body>
</body>
</html>

I'm struggling with exactly same case!

HTML checker by @wilson is working just fine with two little exceptions: it doesn't capture fn nor power (which actually what I want to make use of)

Found on the internet (using AutoHotKey)

;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================

; 1) Swap Windows (Command) and Alt keys
; These button locations are reversed on Mac keyboards

LAlt::LCtrl
LCtrl::LAlt

; 2) Map F13 to Print screen
; Mac keyboards don't have a print-screen button!

F13::PrintScreen

(F13 in my case doesn't work, clipboard remains empty)

Maybe there is a way to read keycode and send it using these codes: (v=vs.85).aspx

(my case is even more complicated as I'm using polish layout and there is another layer of complexity with diacritic marks)

Take a look at KeyboardStateView

It indicates the details of each key stroke live, including:

  • Key Name
  • Description
  • Key Code
  • Hex Key Code
  • Whether it was pressed
  • Whether it was toggled
1

Online tool: keycode.info

  1. Visit
  2. Press any key to get the keycode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest