Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8929583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:42:17+00:00 2026-06-15T08:42:17+00:00

It seems like this article by Steve Losh has been making the rounds, and

  • 0

It seems like this article by Steve Losh has been making the rounds, and in short, it led me to remap Caps Lock to F19, and at the system level, to remap F19 to Shift-Command-Ctrl-Alt, thus giving me an entire namespace for my own keyboard shortcuts.

The problem is I enjoyed using Caps Lock as my escape key in Vim.
I tried :map <M-C-D-S> <esc>, but upon sourcing, hitting caps lock doesn’t do anything. I’m guessing it’s because Vim expects an actual key to be pressed with the modifiers.

My question is: is it possible to have Vim read Shift-Cmd-Ctrl-Alt as Escape?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:42:18+00:00Added an answer on June 15, 2026 at 8:42 am

    My original question suffers as an XY Problem.

    You want to do X, and you think Y is the best way of doing so. Instead of asking about X, you ask about Y.

    I wanted to Vim to read Caps Lock as Esc (while still maintaining the other crazy system-level modifications), so I asked about functionality that Vim doesn’t have.

    Turns out, while the answers provided above were great, on point, and informative, I just don’t like being told ‘no.’ And I was searching for answers in the wrong problem space.

    One of the applications discussed in the OP’s link, KeyRemap4MacBook, is highly extensible. The documentation leaves much to be desired, but I was able to piece together a solution in line with my original question. This diverges sharply from the original topic of “map stuff in vim,” and for that I apologize, but I hope to leave this in posterity for the one poor soul that needs this.

    Simply put, the previous article recommends adding this to KR4MB’s ‘private.xml’ file:

    <item>
        <name>Remap Caps Lock to Hyper</name>
        <appendix>OS X doesn't have a Hyper. This maps Left Control to Control + Shift + Option + Command.</appendix>
    
        <identifier>caps_lock_to_hyper</identifier>
    
        <autogen>
            --KeyToKey--
            KeyCode::F19,
    
            KeyCode::COMMAND_L,
            ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L
        </autogen>
    </item>
    

    (modified slightly for Caps Lock)

    This can instead be changed to:

    <item>
      <name>Caps Lock to Hyper OR Escape</name>
      <appendix>Caps Lock should be remapped to F19 (80) in PCKBH</appendix>
      <appendix>This remaps F19 to "Hyper" aka Cmd-Shift-Ctrl-Alt...</appendix>
      <appendix>...but, when pressed alone, F19 sends only escape</appendix>
      <identifier>remap.hyper2hyper_escape</identifier>
      <autogen>
          --KeyOverlaidModifier-- 
          KeyCode::F19, 
    
          KeyCode::COMMAND_L,
          ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L, 
    
          KeyCode::ESCAPE
      </autogen>
    </item>
    

    This tells the system that whenever Caps Lock is pressed alone, it’s actually Esc, but if it’s pressed in conjunction with any other key, it’s F19.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based on this article , it seems like SO is using Javascript OpenID Selector
Seems like this should be obvious, but how do I send arrow key presses
Seems like this should be simple, but powershell is winning another battle with me.
Can this be done? It seems like this should be possible. In general, I
This seems like a repeated question but i'm not able to get my answer.
This seems like such a simple issue but I cannot find an elegant solution.
This seems like the simplest Git question, but I can't find ANYTHING on it.
This seems like something that could be quite useful and yet and I can't
This seems like it should be relatively straightforward, I cannot figure out what I'm
This seems like a must have form input for a mobile ui framework, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.