Damon's Blog
  • Damon's Blog
  • 💻Tech
    • Understand C++ Special Member Function Generation
    • Understand C++ Template Type Deduction
    • Using Windows Keymap in Mac and Intellij
    • Setup C++ Dev Env in MacOS using Docker
    • Floating-point Arithmetic
    • Java HFT Toolbox
    • Interesting Bitwise Operation
    • Python Metaclass
    • Memory Order
    • Grind 75+
      • Array
      • String
      • Matrix
      • Binary Search
      • Graph
      • Tree
      • Math
      • Hash Table
      • Recursion
      • Linked List
      • Stack
      • Heap
      • Trie
      • Dynamic Programming
      • Binary Operation
    • C++ for Java Developers
    • Typical Domain Driven Design Application Architecture
    • How to Deploy Applications in Linux Properly
    • Design Patterns with Java Examples
    • Tools for Reliability
    • MVCC in Database
    • Two Microservice Tech Stacks
    • The Difference between 127.0.0.1 and 0.0.0.0
  • ➗Math
    • Local Volatility in Terms of Implied Volatility
    • Mean and Variance of Squared Gaussian
    • A Simple Explanation of Information Gain
  • 💲Trading
    • Understanding Risk-Neutral Density Functions
    • The Deriving of Black-Scholes Equation
    • Quant Questions
  • 💎Gems
    • 2024
  • 📖Books
    • Performance Analysis and Tuning on Modern CPUs
Powered by GitBook
On this page
  • Swap the Control and Command Key
  • Use the Standard Function Key
  • Use XWin Keymap
  • Cancel the Swap of Keys for Intellij IDEA Only
  • Disable CTRL + → and CTRL + ← Switches Desktops
  • Disable Some macOS Shortcuts
  • Update the Keymap in VMWare
  • Update XWin Keymap in macOs
  • TO BE CONTINUED
  • Reference

Was this helpful?

  1. Tech

Using Windows Keymap in Mac and Intellij

PreviousUnderstand C++ Template Type DeductionNextSetup C++ Dev Env in MacOS using Docker

Last updated 7 months ago

Was this helpful?

Finally, the day comes as I don't want to remember two sets of hotkeys of Intellij IDEA in MacOS and Windows while using a Windows Keyboard.

The target is to swap the control/command buttons on the keyboard in all applications except IntelliJ so I can use ctrl + c/v/a/f/... through the whole system.

Before starting, better to check which type of the Windows keyboard you have -

Swap the Control and Command Key

Because the difference in the layout of Windows Keyboard and Mac Keyboard, we need to swap the Control and Command key.

Use the Standard Function Key

Use XWin Keymap

Download the XWin Keymap and use it.

Cancel the Swap of Keys for Intellij IDEA Only

Swapped the control/command buttons on the keyboard in all applications except IntelliJ so I can use ctrl + c/v/a/f/... through the whole system.

{
    "description": "control/command swap",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.jetbrains.+"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": { "key_code": "left_control" },
            "to": [{ "key_code": "left_command" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": [
                        "^com\\.jetbrains.+"
                    ],
                    "type": "frontmost_application_unless"
                }
            ],
            "from": { "key_code": "left_command" },
            "to": [{ "key_code": "left_control" }],
            "type": "basic"
        }
    ]
}

Note that using this configuration all the JetBrains products' keymap will be updated.

Disable CTRL + → and CTRL + ← Switches Desktops

Go to System Preferences > Keyboard > Shortcuts > Mission Control and change the settings for "Move left a space" and "Move right a space" or disable them completely.

So that the experience when coding in Intellij will be the same as moving between words.

Disable Some macOS Shortcuts

There may have some conflicts between the XWin keymap and macOS keymap.

Update the Keymap in VMWare

If your VMWare window flickers randomly, try the following configuration,

Update XWin Keymap in macOs

  • Map the Insert to your keyboard (on my keyboard the Insert key is mapped to Help in Intellij, not sure if it's the same to others...),

    1. New...

    2. Generate...

TO BE CONTINUED

I will check if other settings need to be updated to keep the experience aligned between coding in Windows and coding in macOS, stay tuned.

Reference

is used here.

Another option: to use macOS keymap for windows or linux.

💻
Karabiner-Elements
macOS for all
Intellij Default windows keymap on Mac OS X
Essential IntelliJ IDEA keyboard shortcuts
How to use Windows keymap on Mac and in your favorite IDE for example IntelliJ?
ANSI vs ISO: What’s the best keyboard layout?