Skip to content

Instantly share code, notes, and snippets.

@prestonmcgowan
Created October 17, 2025 13:18
Show Gist options
  • Save prestonmcgowan/f2154f5d31ce78dc81d9ff679d92c508 to your computer and use it in GitHub Desktop.
Save prestonmcgowan/f2154f5d31ce78dc81d9ff679d92c508 to your computer and use it in GitHub Desktop.
CapsLock to send Shift+Enter for chat tools
Here's how to set up Karabiner-Elements to map Caps Lock to Shift+Enter:
Step 1: Install Karabiner-Elements
Download from https://karabiner-elements.pqrs.org/
Install and grant the necessary permissions when prompted
Step 2: Create a Custom Rule
Open Karabiner-Elements
Go to the Complex Modifications tab
Click Add rule button at the bottom
Click Import more rules from the Internet (this opens a browser)
Or, better yet, manually add a custom rule:
Step 3: Add Custom JSON Rule
In Karabiner-Elements, go to Misc tab
Click Open config folder
Navigate to karabiner.json or create a custom rule file in the assets/complex_modifications/ folder
Create a new JSON file (e.g., caps_to_shift_enter.json) with this content:
```json
{
"description": "New Rule (change left_shift+caps_lock to page_down, right_shift+caps_lock to left_command+mission_control)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": ["left_shift"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "page_down",
"modifiers": []
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": ["right_shift"],
"optional": ["any"]
}
},
"to": [
{
"apple_vendor_keyboard_key_code": "mission_control",
"modifiers": ["left_command"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [],
"optional": ["any"]
}
},
"to": [
{
"key_code": "return_or_enter",
"modifiers": ["left_shift"]
}
],
"type": "basic"
}
]
}
```
Step 4: Enable the Rule
Go back to Complex Modifications tab in Karabiner-Elements
Click Add rule
You should now see "Map Caps Lock to Shift+Enter"
Click Enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment