Coder Social home page Coder Social logo

vonng / capslock Goto Github PK

View Code? Open in Web Editor NEW
1.4K 22.0 284.0 5.53 MB

Make Capslock Great Again!

License: Apache License 2.0

AutoHotkey 34.31% Shell 0.20% HTML 64.76% Makefile 0.73%
capslock capslock-hyper karabiner autohotkey karabiner-elements capslock-enhancement

capslock's Introduction

CapsLock

Make CapsLock Great Again!

中文文档 | EN DOCS | Karabiner Gallery | Github Repo | Import URL

Visits Badge


CapsLock Enhancement Mac v3

Transform CapsLock into a powerful modifier Hyper that miraculously increases your work productivity!

control-plane-0

Control Plane 0 Layout (There are 15 more!)


Highlights

  • Powerful: Transform Capslock into a great modifier: Hyper(). (such as )
  • Useful: Navigation, mousekey, clipboard, win/term ctrl, shortcuts, etc... Redefine the keyboard!
  • Speed-Up: Optimized for developers, high-frequency move stay in hot zone.
  • Extensible: Work with existing modifiers, which introduce 16 extra control planes.
  • MouseKey: Manipulate mouse cursor and wheels with keyboard
  • Cross-Platform: MacOS and Windows. Light-Weight and portable


Features

  • Basic : Press Capslock emit an Escape. Hold it enabling the Hyper Modifier.
  • Navigation : Vim style navigation. Cursor move, text selection, switch desktop/window/tab, mouse move/wheel,etc...
  • Deletion : Maps BNM, to deletion operation to perform fast char/word/line deletion without hand move.
  • MouseKey : Maps keypad to fully functional mouse
  • Window : Close app/win/tab, Switch app/win/tab/desktop, integration with win-manager app such as Moom,Slate,Magnet
  • Application : Shortcuts for launching or switching frequently used applications
  • Terminal : Sending high-freq signals (Ctrl-Z, Ctrl-D, Ctrl-C) and vim/tmux prefix meta key via
  • Clipboard : Turn numkeys into 10 different text clipboard. n copy and n paste.
  • Shifter : Turn some keys into common code symbols.
  • Functional : Screenshtots. Fine-grained light/volume control. Take function keys' function back!


Install

It only takes two steps to enable Capslock on your Mac: Download & Enable

  1. Download

    Download & Install Karabiner-Elements.

    Following the wizard and grant required permissions (Settings - Security - Privacy)

  2. Enable

    Open this link with Safari. It will launch Karabiner-Elements and load configuration.

    karabiner://karabiner/assets/complex_modifications/import?url=https://raw.githubusercontent.com/Vonng/Capslock/master/mac_v3/capslock.json

    Alternative Links

    Click Enable All for Capslock Enhancement on pop-up dialog. It will affect immediately.

    You can now try moving cursor with ⇪ + h,j,k,l , And exploring more features below.


Usage

Capslock works on ANSI keyboards and similar layouts. It literally remaps every keys on the keyboard. Including 10 categories.

Control Planes are defined by combination of four extra left modifiers: .This image shows the layout of control plane 0.

Category Color Description
Basic Blue Press Capslock emit an Escape. Hold it enabling the Hyper Modifier.
Navigation Pink Vim style navigation. Cursor move, text selection, switch desktop/window/tab, mouse move/wheel,etc...
Deletion Brown Maps BNM, to deletion operation to perform fast char/word/line deletion without hand move.
MouseKey Keypad Maps keypad to fully functional mouse
Window Azure Close app/win/tab, Switch app/win/tab/desktop, intergration with win-manager app such as Moom,Slate,Magnet
Application Yellow Shortcuts for launching or switching frequently used applications
Terminal Green Sending high-freq signals (Ctrl-Z, Ctrl-D, Ctrl-C) and vim/tmux prefix meta key via
Clipboard Purple Turn numkeys into 10 different text clipboard. n copy and n paste.
Shifter Orange Turn some keys into common code symbols.
Functional Cyan Screenshtots. Fine-grained light/volume control. Take function keys' function back!

Basic

Key MapsTo Comment
Press Escape Click Capslock to emit Escape
Hold Hyper Hold Capslock to enable Hyper modifier.
Capslock Press to switch Capslock status
Switch input source, + to emoji

Note that is implemented as combination of ALL RIGHT MODIFIERS: .

Hold Hyper to enable hyper functionalities. We will assume and omit that in subsequent document.

Navigation

  • H, J, K, L, U, I, O, P are used as Navigators. Maps to by default. (pink area).
  • 9 control planes has already been allocated for navigators.
  • Hold additional Command for selection. (like holding shift in normal), additional Option for word/para selection.
  • Hold additional Shift for app/win/tab switching. Hold additional Control for desktop management .
  • Hold additional Option for 🖱️ mouse move. Add shift to ⏫ accelerate. (U, I, O, P maps to mouse buttons) .
  • turns navigator to 🖲️ mouse wheel, and is the ⏫ accelerated version . HJKL for wheel, wihle UIOP for reversed wheel move.
Feature Move Select WordSel Window Desktop 🖱️ 🖱️⏫ 🖲️ 🖲️⏫
Key\Mod
H Left word left word left prev tab prev desk ⬅️ ⬅️⏫ ⬅️ ⬅️⏫
J Down line down 3 line down next app focus ⬇️ ⬇️⏫ ⬇️ ⬇️⏫
K Up line up 3 line up prev app expose all ⬆️ ⬆️⏫ ⬆️ ⬆️⏫
L Right word right word right next tab next desk ➡️ ➡️⏫ ➡️ ➡️⏫
U PgUp prev page prev page zoom- fullscreen 🖱️L 🖱️L ➡️ ➡️⏫
I Home line head end2head prev win hide 🖱️R 🖱️R ⬆️ ⬆️⏫
O End line end head2end next win hide all 🖱️B 🖱️B ⬇️ ⬇️⏫
P PgDn next page next page zoom+ Launchpad 🖱️F 🖱️F ⬅️ ⬅️⏫

Arrow Navigation

  • Arrows → to 🖱️ mouse actions too. Hold Option to ⏬ slow down, hold Command to ⏫ speed up.
  • Hold Shift turns to 🖲️ wheel move. Extra Option to ⏬ slow down, extra Command to ⏫ speed up.
  • Return maps to left click. And additional turns into right click, middle click, backward, forward.
Feature 🖱️ 🖱️⏬ 🖱️⏫ 🖲️ 🖲️⏬ 🖲️⏫
Key\Mod
speed = 1600 speed ÷ 2 speed × 2 speed = 32 speed ÷ 2 speed × 2
🖱️L 🖱️M 🖱️R 🖱️L 🖱️B 🖱️F

Deletion

N M , . are used as Deletor keys. Right below the navigators for fast access (brown area).

Key\Mod
N del a word ahead del till line head del the whole line
M del a char ahead del a word ahead move line below
, del a char after del a word after move line above
. del a word after del till line end del the whole line
del file purge file

MouseKey

  • Turn Keypad into a fully funcional 🖱️ mouse.
  • Numbers maps to 8 direction 🖱️ mouse move. Hold Option to ⏬ slow down, hold Command to ⏫ speed up.
  • Hold additional Shift turns to 🖲️ wheel move. Extra Option to ⏬ slow down, and extra Command to ⏫ speed up.
  • First line maps to wheel move and 0, ., , +, - maps to five mouse buttons.
🖲️⬅️ = 🖲️⬇️ / 🖲️⬆️ * 🖲️➡️
7🖱️ ↖️ 8 🖱️⬆️ 9 🖱️↗️ - 🖱️B
4🖱️ ⬅️ 5🖱️ 6 🖱️➡️ + 🖱️F
1🖱️↙️ 2 🖱️⬇️ 3 🖱️↘️
0 🖱️L . 🖱️M 🖱️R

Window Control

  • Tab, Q, W, A, s used as window control keys. Focuing on close/switch applications / windows / tabs / desktops. (azure area)
  • Windows management (resize, layout) leaves to external application such as Moom, Magnet, and Slate. Bind A manually.
Key\Mod
next app prev app switch desktop switch tab
Q close app close app Lock Screen Logout
W close tab close all win Display Sleep Sleep
A win app expose all show desktop LaunchPad
S next tab prev tab next win prev win

App Shortcuts

  • E R T Y F G are used as application shortcuts. (yellow area)
  • Popular apps and dev tools are registed to 3 default planes: //. Assign these shortcuts according to your own needs.
Key\Mod
E Safari Finder Mail
R iTerm2 Preview Terminal
T Visual Studio Code Typora Note
Y Siri Karabiner Amphetamine
F Alfred 4 Dash Dictionary
G Intellij IDEA Chrome Calender

Terminal Control

D, Z, X, C, V, B are used as terminal control keys. Sending singals and IDE commands. (green area)

Key\Mod
D D Ctrl+D (Send EOF) Define (Force touch)
Z Z Ctrl+Z (SIGTSTP) F5 (VS Code Debug)
X R Ctrl+R (IDE Run) F5 (VS Code Run)
C C Ctrl+C (SIGINT) >F5(VS Code Stop)
V VCtrl+V (Vim Prefix)
B BCtrl+B (Tmux Prefix)

Clipboard

Number keys 1, 2, …, 9, 0 are used as (text) clipboard. Hold to copy, and press to paste. (purple area)

Key\Mod
1 Paste from clip 1 Copy to clip 1
2 Paste from clip 2 Copy to clip 2
…… …… ……
0 Paste from clip 0 Copy to clip 10

Shifter

  • Trivial transformation for misc characters. (orange area)
  • Some special tricks for developers. Such as ;' maps to := or != ()
Key\Mod
- _ Zoom Out
= + Zoom In
[ ( { <
] ) } >
; ! :
' = =
/ /
\ /

Functional

  • Use F1,…F12 as standard functional keys, while hold Hyper to turn them back. (cyan area)

  • Command + F1 / F2 / F3 are used as desktop switcher. Enable shortcuts in system preference first:

    PreferenceKeyboardShortcutsMissionControl → Switch to Desktop 1/2/3

  • If you are using RMBP with Bar, consider changing your bar back to function keys with:

    Karabiner-ElementsFunction KeysUse all F1, F2, etc. keys as standard function keys

Key\Mod Comment
` 4 4 Area selection screenshot( to file)
F1 display_brightness_decrement | 1 1 Brightness Down / Desktop 1
F2 display_brightness_increment | 2 2 Brightness Up / Desktop 2
F3 | 3 3 Expose All / Desktop 3
F4 Launchpad Launchpad
F5 illumination_decrement Keyboard Light Down
F6 illumination_increment Keyboard Light Up
F7 rewind Music Prev
F8 play_or_pause Play / Pause
F9 fastforward Music Next
F10 mute Mute
F11 volume_decrement Volume Down
F12 volume_increment Volume Up
F13 3 3 Full Screentshot ( to file)
F14 5 6 Screenshot menu ( touchbar snap)
F15 play_or_pause Play / Pause
Insert display_brightness_increment Fine-Grained Brightness Up
Delete display_brightness_decrement Fine-Grained Brightness Down
Home illumination_increment Fine-GrainedKeyboard Light Up
End illumination_decrement Fine-Grained Keyboard Light Down
PgUp volume_increment Fine-Grained Volume Up
PgDn volume_decrement Fine-Grained Volume Down

References

Symbols

Glyph Name Glyph Name
Capslock Hyper
Escape Space
Command (Mac) Alter (Win)
Option (Mac) Win (Win)
Control Shift
Return Enter
Arrow Cursor Home/End
Tab Delete / ForwardDelete
Numlock ⏫⏬ Fast / Slow
🖱️L Mouse Left Click (Button1) 🖱️B Mouse Backward (Button4)
🖱️R Mouse Right Click (Button2) 🖱️F Mouse Forward (Button5)
🖱️M Mouse Middle Click (Button3) 🖲️ Mouse Wheel

Control Planes

control planes
Plane Modifiers Plane Modifiers Plane Modifiers
0 3 7
1 5 11
2 6 13
4 9 14
8 10 15
12

Version

MacOS Supported Win Supported
MacOS Big Sur (11.0 ) Windows 10
MacOS Catalina (10.15) Windows 8
MacOS High Sierra (10.13) Windows 7
MacOS Sierra (10.12) Windows Vista
MacOS EI Capitan (10.11) Windows XP
MacOS Yosemite (10.10) or lower
(via Capslock Mac v1
(via Capslock Win)

MacOS v3 is actively maintained, available on MacOS 10.11 - 11.x. Yosemite (10.10) or lower are supported via Capslock Mac v1

Windows version is already archived. You can use pre-compiled binary or install AutoHotKey and load capslock.ahk manually


FAQ

Q: Why using as the symbol for Hyper?

A: Because the ASCII code for * is exactly 42, which is the ultimate answer to life, universe, and everything. (Heavy-Asterisk) is a pretty version of *.

Q: What's new in v3?

A: The original v2 only use 1 ~ 3 control planes. While v3 uses up to 9 control planes. A large number of functions have been added to make the additional modifier functioning in a reasonable way.

Q: Is there any incompatible changes in V3 compare to V2 ?

A: There are three minor incompatible changes:

  • F13/F4 from music prev/next to screenshot;

  • Number keys are used as clipboard instead of shifter

  • D now perform define(force touch) instead of opening dictionary app.

Q: Why is there no Linux OS support?

A: I'm using Linux through MacOS terminal. It actually feels much better than raw Linux 😆. This feature can be achieved via xmodmap, contribution are welcome!

Q: Why is there an older version in MacOS?

A: There was an older version of Karabiner that used XML config. Apple modified it's kernel architecture in MacOS Sierra (10.12) and many programs had to be overhauled. So then there was a new version of Karabiner, the Karabiner-Elements, which is still in use today.

Q: How can I customize it to my needs?

A: Just fork this repo and make modification to mac_v3/capslock.json according to documentation You can edit the more human-readable format mac_v3/capslock.yml then compile it into capslock.json format with make compile.

Q: Is this original?

A: I'm the first one to make a capslock overhaul schema as far as I know. The original win AHK version was wrote in 2013. The first mac version was wrote in 2015. It is the first capslock emulation schema in karabiner's gallery.


Feedbacks


About

Author: Vonng ([email protected])

License: Apache 2.0 License

Beian: 浙ICP备15016890-3号

capslock's People

Contributors

dmgm avatar jabster28 avatar lkhphuc avatar macoril avatar miozus avatar mustafa-kaya avatar qbosen avatar roryq avatar vonng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capslock's Issues

移动至行首/行尾

请问如何实现移动至行首/行尾,有时候蛮需要这个操作的,自己没有找到相应的键位,烦请赐教,非常感谢!

无法进入hyper模式

问题:
长按住 caps lock键无法进入hyper模式,键盘大写灯不亮,没有任何作用,删除配置后,长按caps lock键盘,灯会亮,大写功能正常
如果一直按住 caps lock键不放,操作其他键,可以达到hyper模式的效果

Desktop (please complete the following information):

  • mac os 10.14
  • 配置文件3.03
  • Karabiner 12.10

[Enhancement] MacBook keyboard visualisation

I created a layout of 3 basic planes for easier visual understanding of which button does what. (I used MacBook's keyboard layout). Feel free to use it as a reference or anywhere really.
CapsLock.pdf

Macbook keyboard layout:

CapsLock_1

Colored:

CapsLock_2

HyperKey:

CapsLock_3

HyperKey + Cmd:

CapsLock_4

HyperKey + Option:

CapsLock_5

Caps Lock + Escape does not enable Capslock

As the title states, pressing Caps Lock + Escape does not enable the actual CapsLock. The configuration file is the default config file and there is no extra modifications.

Scroll Functionality

Is your feature request related to a problem? Please describe.
No issues

Describe the solution you'd like
It would be great to have scrolling functionality with a modifier/hyper key and some letter buttons or even better a trackpad move. This might help help to emulate trackpoint by some degree

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

  • Mouse keys ambidextrous rule for Karabiner
  • Scroll 2 by Ryan Hanson

【error】`to` entry error: event type is invalid: `{"modifiers":["left_control"]}`

[2021-04-11 20:07:28.023] [info] [console_user_server] Load /Users/amazm/.config/karabiner/karabiner.json...
[2021-04-11 20:07:28.042] [info] [grabber] core_configuration is updated.
**[2021-04-11 20:07:28.050] [error] [grabber] karabiner.json error: `to` entry error: `modifiers` error: unknown modifier: `lelft_shift`
[2021-04-11 20:07:28.051] [error] [grabber] karabiner.json error: `to` entry error: `modifiers` error: unknown modifier: `lelft_shift`
[2021-04-11 20:07:28.051] [error] [grabber] karabiner.json error: `to` entry error: event type is invalid: `{"modifiers":["left_control"]}`
[2021-04-11 20:07:28.051] [error] [grabber] karabiner.json error: `to` entry error: event type is invalid: `{"modifiers":["left_shift"]}`**
[2021-04-11 20:07:28.052] [info] [console_user_server] core_configuration is updated.
[2021-04-11 20:07:28.054] [info] [virtual_hid_device_service] create_virtual_hid_pointing_io_service_client
[2021-04-11 20:07:28.054] [info] [virtual_hid_device_service] io_service_client::async_start
[2021-04-11 20:07:28.055] [info] [virtual_hid_device_service] driver_version_ is changed: 10300
[2021-04-11 20:07:28.055] [info] [virtual_hid_device_service] io_service_client::opened
[2021-04-11 20:07:28.055] [info] [virtual_hid_device_service] io_service_client::async_virtual_hid_pointing_initialize
[2021-04-11 20:07:28.057] [info] [observer] matching device:
[2021-04-11 20:07:28.057] [info] [observer]   registry_entry_id: 4294969655
[2021-04-11 20:07:28.057] [info] [observer]   manufacturer: pqrs.org
[2021-04-11 20:07:28.057] [info] [observer]   product: Karabiner DriverKit VirtualHIDPointing 1.3.0
[2021-04-11 20:07:28.057] [info] [observer]   vendor_id: 5824
[2021-04-11 20:07:28.057] [info] [observer]   product_id: 10202
[2021-04-11 20:07:28.057] [info] [observer]   location_id: 0x0
[2021-04-11 20:07:28.058] [info] [observer]   serial_number: pqrs.org:Karabiner-DriverKit-VirtualHIDPointing
[2021-04-11 20:07:28.058] [info] [observer]   is_keyboard: false
[2021-04-11 20:07:28.058] [info] [observer]   is_pointing_device: true
[2021-04-11 20:07:28.060] [info] [observer] rescan devices...
[2021-04-11 20:07:28.061] [info] [observer] Karabiner DriverKit VirtualHIDPointing 1.3.0 (device_id:4294969655) is observed.
[2021-04-11 20:07:28.235] [info] [virtual_hid_device_service] virtual_hid_pointing_ready_ is changed: true
[2021-04-11 20:07:29.235] [info] [grabber] virtual_hid_device_service_client_ virtual_hid_pointing_ready_response: true
[2021-04-11 20:08:57.065] [info] [grabber] Load /Users/amazm/.config/karabiner/karabiner.json...
[2021-04-11 20:08:57.090] [info] [console_user_server] Load /Users/amazm/.config/karabiner/karabiner.json...
[2021-04-11 20:08:57.120] [info] [grabber] core_configuration is updated.
**[2021-04-11 20:08:57.207] [error] [grabber] karabiner.json error: `to` entry error: event type is invalid: `{"modifiers":["left_control"]}`
[2021-04-11 20:08:57.207] [error] [grabber] karabiner.json error: `to` entry error: event type is invalid: `{"modifiers":["left_shift"]}`**
[2021-04-11 20:08:57.347] [info] [console_user_server] core_configuration is updated.

从官网加载配置报错,lelft单词拼错了,我改了一下

下面的error找不到在哪里,也许蛮多处?

早上还用着好好的,研究了一天newvim,,突然uiop组成出来的home键、end键 检测是出来的,但键盘敲一下,触发2个button-down和2个button-up,但文本编辑没反应(应该跳转到开头)了,关键所有键盘映射插件,重启,改了配置,基本恢复正常了。

Custom Hyper Shortcuts Available for Global App Usage?

Is your feature request related to a problem? Please describe.
I'd like to have some hyper key custom shortcuts available to use in applications, such as Raycast that work on a global level.

Describe the solution you'd like
I'd love to see a layer that would allow you to send hyper shortcuts to the system to be picked up by applications.

Describe alternatives you've considered
I've thought about disabling features to open up key availability, but it would be nice if there was a layer so that mnemonics could be used.

sysdiagnose is triggered frequently

For some reason MacOS sysdiagnose is triggered frequently after installing Karabiner with Capslock.
Similar problem is also reported here pqrs-org/Karabiner-Elements#1107 but I don't know how to integrate with this module. It is also a bit hard to reproduce as there's no instant feedback. Sysdiagnose usually runs for a while before it generates reports under /private/var/tmp. Wonder if anyone has the same problem and how to fix it.

Problem with clipboard management?

Describe the bug
Clipboards does not work as intended.

A small example:

  • Text "One" is selected and copied by HYPER + CMD + 1

  • Text "Two" is selected and copied by HYPER + CMD + 2

  • Pressing HYPER + 1 four times gives output:
    "TwoOneOneOne"

  • Pressing HYPER + 2 four times gives output:
    OneTwoTwoTwo

Expected behavior

Text "One" is selected and copied by HYPER + CMD + 1
Text "Two" is selected and copied by HYPER + CMD + 2

Pressing HYPER + 1 four times gives output:
"OneOneOneOne"

Pressing HYPER + 2 four times gives output:
TwoTwoTwoTwo

Desktop (please complete the following information):

  • OS: Mac OS 12.4
  • Karabiner version: 14.6.0

Has anyone else seen this?

Windows AHK 脚本格式化

您好,看您的 ahk 脚本格式化得很漂亮,非常方便阅读,请问是使用什么工具编辑和格式化的呢?

Add option for ijkl navigation

First, let me say this repository is awesome! I really find it useful
I did tweak one thing though - I am trying to get used to the 60% keyboard-style of navigation (as found on pok3r and ducky one 2's) - which uses Caps Lock + ijkl for arrow navigation, and o/u for page down/up.
Would it be possible to add an optional profile for it by default? I think some people would find it very useful

Thanks!

请问具体的开源协议?

你好, 你的开源协议里面使用了 WTFPL
但是上面又有一个声明 changing it is not allowed.

请问我再你的代码里面截取一些部分放入我的一个开源项目当中是被允许的吗?
谢谢

Mac Version?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

unable to use cap + cmd + I to select text

Here is the output of EventViewer

[
  {
    "type": "down",
    "name": {"key_code":"right_command"},
    "usagePage": "7 (0x0007)",
    "usage": "231 (0x00e7)",
    "misc": "flags right_command"
  },
  {
    "type": "down",
    "name": {"key_code":"right_control"},
    "usagePage": "7 (0x0007)",
    "usage": "228 (0x00e4)",
    "misc": "flags right_command,right_control"
  },
  {
    "type": "down",
    "name": {"key_code":"right_option"},
    "usagePage": "7 (0x0007)",
    "usage": "230 (0x00e6)",
    "misc": "flags right_command,right_control,right_option"
  },
  {
    "type": "down",
    "name": {"key_code":"right_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "229 (0x00e5)",
    "misc": "flags right_command,right_control,right_option,right_shift"
  },
  {
    "type": "down",
    "name": {"key_code":"left_command"},
    "usagePage": "7 (0x0007)",
    "usage": "227 (0x00e3)",
    "misc": "flags left_command,right_command,right_control,right_option,right_shift"
  },
  {
    "type": "down",
    "name": {"key_code":"left_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "225 (0x00e1)",
    "misc": "flags left_command,left_shift,right_command,right_control,right_option,right_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"left_command"},
    "usagePage": "7 (0x0007)",
    "usage": "227 (0x00e3)",
    "misc": "flags left_shift,right_command,right_control,right_option,right_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"right_control"},
    "usagePage": "7 (0x0007)",
    "usage": "228 (0x00e4)",
    "misc": "flags left_shift,right_command,right_option,right_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"right_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "229 (0x00e5)",
    "misc": "flags left_shift,right_command,right_option"
  },
  {
    "type": "up",
    "name": {"key_code":"right_option"},
    "usagePage": "7 (0x0007)",
    "usage": "230 (0x00e6)",
    "misc": "flags left_shift,right_command"
  },
  {
    "type": "up",
    "name": {"key_code":"right_command"},
    "usagePage": "7 (0x0007)",
    "usage": "231 (0x00e7)",
    "misc": "flags left_shift"
  },
  {
    "type": "down",
    "name": {"key_code":"home"},
    "usagePage": "7 (0x0007)",
    "usage": "74 (0x004a)",
    "misc": "flags left_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"home"},
    "usagePage": "7 (0x0007)",
    "usage": "74 (0x004a)",
    "misc": "flags left_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"left_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "225 (0x00e1)",
    "misc": ""
  },
  {
    "type": "down",
    "name": {"key_code":"right_control"},
    "usagePage": "7 (0x0007)",
    "usage": "228 (0x00e4)",
    "misc": "flags right_control"
  },
  {
    "type": "down",
    "name": {"key_code":"right_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "229 (0x00e5)",
    "misc": "flags right_control,right_shift"
  },
  {
    "type": "down",
    "name": {"key_code":"right_option"},
    "usagePage": "7 (0x0007)",
    "usage": "230 (0x00e6)",
    "misc": "flags right_control,right_option,right_shift"
  },
  {
    "type": "down",
    "name": {"key_code":"right_command"},
    "usagePage": "7 (0x0007)",
    "usage": "231 (0x00e7)",
    "misc": "flags right_command,right_control,right_option,right_shift"
  },
  {
    "type": "up",
    "name": {"key_code":"right_shift"},
    "usagePage": "7 (0x0007)",
    "usage": "229 (0x00e5)",
    "misc": "flags right_command,right_control,right_option"
  },
  {
    "type": "up",
    "name": {"key_code":"right_control"},
    "usagePage": "7 (0x0007)",
    "usage": "228 (0x00e4)",
    "misc": "flags right_command,right_option"
  },
  {
    "type": "up",
    "name": {"key_code":"right_option"},
    "usagePage": "7 (0x0007)",
    "usage": "230 (0x00e6)",
    "misc": "flags right_command"
  },
  {
    "type": "up",
    "name": {"key_code":"right_command"},
    "usagePage": "7 (0x0007)",
    "usage": "231 (0x00e7)",
    "misc": ""
  },
  {
    "type": "down",
    "name": {"pointing_button":"button1"},
    "usagePage": "9 (0x0009)",
    "usage": "1 (0x0001)",
    "misc": ""
  }
]

I use the default setting and did not change keyboard map setting.
karabiner-Elements version 14.13.0
M1 Pro chip, 14.5 (23F79)

使用数字键拷贝粘贴重复的bug

你好,当我学习使用数字键1,2 进行分别拷贝粘贴的时候,遇到了这样一个bug

我分别用*+command+1 和*+command+2去拷贝不同的文本,
然后用*+command+1去粘贴,然后粘贴的是文本1,
然后用*+command+2去粘贴,这时候第一次粘贴的还是文本1,第二次粘贴以及之后才是文本2,反过来也是如此。

我使用的是mac12.0.1 m1芯片的笔记本,期望你的回复,感谢

caps + esc 无法切换大小写

win10 下,
caps + esc 无法切换大小写
caps + space 无法切换输入法, 但是 使用 caps + shift + L 居然能切换输入法中英文模式,这个功能在说明文档里并没有看到

使用的是 win10下 exe 直接使用,没有用 ahk
以及,键盘图上展示的是否为 mac 键盘?对于windows键盘有无对应的按键。尝试了如 shift / alt / ctrl 的组合,但是有些文档里给出的效果没法使用出来。所以我无法确实是哪里出现bug还是我组合按得不正确

Slow Response

I feel there is a little time delay for some cases, such as switching Chrome tabs. Using Capslock responds slower than just using "ctrl + tab".
Does someone also feel this?

I suspect this is because the "capslock" trigger "right_command + right_control + right_shift + right_option", which is not straightforward. I saw a condition "name": "caps_lock pressed". When using this condition, the responding speed is fine.
Does this suspicion make sense?

Capslock hold doesn't work as Ctrl in Vim

OS: MacOS Catalina 10.15.4
Karabiner-Elements with CapsLock imported

CapsLock as Hyper, my case Ctrl works nicely, for example in ITerm2 if I hold Ctrl and press c it interrupts current process...
But in Vim, it works nicely as tap->ESC, using this feature a lot, but when holding Ctrl I expect to be used as Vim (Ctrl) and it doesn't work...

What I am doing wrong or there are additional configuration needs to be added for Vim?

关于Home和End键映射的一些问题

开发者您好,这是一个非常非常非常牛的项目!

但是使用过程中,在使用如Notion等软件时,使用caps+i(o)操作无法达成预期的效果(行首/行尾),而是会直接跳到文件末尾。我认为原因应该是在Mac中Home和End键的行为不一致导致,但是本人没有全配列键盘无法进行测试。

不知可否做到将caps+i映射到control+a(Mac和大部分Linux系统的行首),以及将caps+o映射到control+e呢

Caps Lock + Escape manipulator missing

The "Caps Lock + Escape" manipulator seems to be missing in "Misc". An implementation of the proposed manipulator is as follows:

{
  "type": "basic",
  "from": {
    "key_code": "escape",
    "modifiers": {
      "mandatory": [
        "right_command",
        "right_control",
        "right_shift",
        "right_option"
      ],
      "optional": [
        "caps_lock"
      ]
    }
  },
  "to": [
    {
      "key_code": "caps_lock"
    }
  ]
}

With caps_lock set as an optional modifier, it will not be difficult to turn Caps Lock off.

Readme的Applications 部分介绍有重复

Open Dictionary 介绍了两次。
另外,Application这个似乎title的级别和上面的Bash Control和下面的Functional有点不一致。
当然,我可能有点吹毛求疵了。

Hyper+left_command+L not working as expected

Hi,

I've made a fork of this repo and I'm having trouble getting hyper + left_command + L to work as I expect. I've made the following mapping in the Hyper Application section and I have Hyper Navigation turned on:

        {
          "type": "basic",
          "from": {
            "key_code": "l",
            "modifiers": {
              "mandatory": [
                "left_command",
                "right_command",
                "right_control",
                "right_shift",
                "right_option"
              ]
            }
          },
          "to": [
            {
              "shell_command": "open -a 'Slack'"
            }
          ]
        },

When I try to use hyper + left_command + t I get the following output from the Karabiner event viewer:

eventType:FlagsChanged    code:0x36       name:right_command   flags:Cmd                                misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Ctrl Cmd                           misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Ctrl Opt Cmd                       misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Shift Opt Cmd                      misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Opt Cmd                            misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:                                   misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Ctrl Cmd                           misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Shift Ctrl Cmd                     misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Ctrl Opt Cmd                       misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Ctrl Opt Cmd                       misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Opt Cmd                            misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:                                   misc:

when I try using hyper + left_command + l I get the following output from the event viewer (note the num pad and f2 being registered):

eventType:FlagsChanged    code:0x37       name:left_command    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:Cmd                                misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Ctrl Cmd                           misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Ctrl Opt Cmd                       misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x38       name:left_shift      flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Shift Opt Cmd                      misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Shift Opt Cmd                      misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Shift Cmd                          misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:Shift                              misc:
eventType:KeyDown         code:0x7c       name:right_arrow     flags:Shift NumPad Fn                    misc:
eventType:KeyUp           code:0x7c       name:right_arrow     flags:Shift NumPad Fn                    misc:
eventType:FlagsChanged    code:0x38       name:left_shift      flags:                                   misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Ctrl Cmd                           misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Shift Ctrl Cmd                     misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:Shift Ctrl Opt Cmd                 misc:
eventType:FlagsChanged    code:0x3c       name:right_shift     flags:Ctrl Opt Cmd                       misc:
eventType:FlagsChanged    code:0x3e       name:right_control   flags:Opt Cmd                            misc:
eventType:FlagsChanged    code:0x3d       name:right_option    flags:Cmd                                misc:
eventType:FlagsChanged    code:0x36       name:right_command   flags:Cmd                                misc:
eventType:FlagsChanged    code:0x37       name:left_command    flags:                                   misc:

Any ideas on what might be going on?

return key

This is great! Any thoughts on how to remap the return key to something else? its still a far stretch (dealing with some RMI here).

Mac下应用捷径无法切换到已打开应用

Describe the bug
open -a $APPLICATION can only open new windows but not switch to bring the opened windows foreground.

To Reproduce
Steps to reproduce the behaviour:

  1. open a finder window
  2. go to another desktop
  3. press the key-bind to open the finder
  4. focus is moved to the finder window, but the window is not shown (the desktop does not change)

Expected behaviour
desktop containing finder window should be moved foreground.

Desktop (please complete the following information):

  • Mac OS 11.6

Additional context
I tested that google chrome can work well, but finder/vscode cannot.

可以支持配合鼠标滚动实现桌面切换吗?

Is your feature request related to a problem? Please describe.
在mac配合使用鼠标的时候,左右切换桌面比较难操作,我现在使用 caps+q / e 来实现左右切换桌面。

Describe the solution you'd like
可以支持按下caps,同时滚动鼠标轮轴就可以左右切换桌面吗?

What's the use case of the "all:" target in makefile?

Hi,

Thanks for the awesome work! I'm forking this repo and add my own customisations.

I understand command make install will copy the new capslock.json to the complex_modifications folder. However, what's the intended use of make all here? The karabiner.json file isn't available or generated within this path.

compile:
	yq eval capslock.yml -j > capslock.json

install: compile
	mkdir -p $$HOME/.config/karabiner/assets/complex_modifications/
	cp capslock.json $$HOME/.config/karabiner/assets/complex_modifications/

all:
	mkdir -p $$HOME/.config/karabiner/
	cp karabiner.json $$HOME/.config/karabiner/

.PHONY: compile,install,all

Caps lock + Space 无法切换中英文输入法

Caps lock + Space 无法切换中英文输入法

type:down            HID usage:7,231      name:{"key_code":"right_command"}                            misc:flags right_command
type:down            HID usage:7,228      name:{"key_code":"right_control"}                            misc:flags right_command,right_control
type:down            HID usage:7,230      name:{"key_code":"right_option"}                             misc:flags right_command,right_control,right_option
type:down            HID usage:7,229      name:{"key_code":"right_shift"}                              misc:flags right_command,right_control,right_option,right_shift
type:down            HID usage:7,224      name:{"key_code":"left_control"}                             misc:flags left_control,right_command,right_control,right_option,right_shift
type:up              HID usage:7,228      name:{"key_code":"right_control"}                            misc:flags left_control,right_command,right_option,right_shift
type:up              HID usage:7,229      name:{"key_code":"right_shift"}                              misc:flags left_control,right_command,right_option
type:up              HID usage:7,230      name:{"key_code":"right_option"}                             misc:flags left_control,right_command
type:up              HID usage:7,231      name:{"key_code":"right_command"}                            misc:flags left_control
type:down            HID usage:7,44       name:{"key_code":"spacebar"}                                 misc:flags left_control
type:up              HID usage:7,44       name:{"key_code":"spacebar"}                                 misc:flags left_control
type:up              HID usage:7,224      name:{"key_code":"left_control"}                             misc:
type:down            HID usage:7,228      name:{"key_code":"right_control"}                            misc:flags right_control
type:down            HID usage:7,230      name:{"key_code":"right_option"}                             misc:flags right_control,right_option
type:down            HID usage:7,231      name:{"key_code":"right_command"}                            misc:flags right_command,right_control,right_option
type:up              HID usage:7,228      name:{"key_code":"right_control"}                            misc:flags right_command,right_option
type:up              HID usage:7,230      name:{"key_code":"right_option"}                             misc:flags right_command
type:up              HID usage:7,231      name:{"key_code":"right_command"}                            misc:
type:down            HID usage:9,1        name:{"pointing_button":"button1"}                           misc:
type:up              HID usage:9,1        name:{"pointing_button":"button1"}                           misc:

image

image

image

  • OS: MacOS 10.15.7 (19H1922)
  • Browser Chrome
  • Version v3

能否为xmodmap提供一样的功能

目前已非常依赖此脚本的功能
但是在linux上xmod只能提供capslock配合hjkl等键使用。
此脚本有一个很好的特性 Ctrl, Alt Compatible ,不知是否可以用在xmodmap上,感谢提供脚本。

Consider blocking some remote software?

When using remote desktop to access Windows, pressing the Caps Lock key opens the browser with the link 'https://www.microsoft365.com/?from=OfficeKey'. This seems to be due to the implementation mechanism, as testing has shown that pressing Win+Alt+Ctrl+Shift simultaneously also triggers it. Should we consider blocking some remote software in the rules?
like this: (my rule for change input method)

"description": "Use right_shift to switch input sources",
            "manipulators": [
                {
                    "conditions": [
                        {
                            "bundle_identifiers": [
                                "^com\\.teamviewer\\.TeamViewer$",
                                "^com\\.vmware\\.horizon$",
                                "^com\\.vmware\\.fusion$",
                                "^com\\.vmware\\.view$",
                                "^com\\.parallels\\.desktop$",
                                "^com\\.parallels\\.vm$",
                                "^com\\.parallels\\.desktop\\.console$",
                                "^org\\.virtualbox\\.app\\.VirtualBoxVM$",
                                "^com\\.citrix\\.XenAppViewer$",
                                "^com\\.vmware\\.proxyApp\\.",
                                "^com\\.parallels\\.winapp\\.",
                                "^com\\.oray\\.sunlogin\\.macclient$",
                                "^com\\.microsoft\\.rdc\\.osx\\.beta"
                            ],
                            "type": "frontmost_application_unless"
                        }
                    ],

Tip on pressing so many keys at once

I'm used to touch-typing, but CapsLock requires me to put my fingers in awkward positions to execute each shortcut, so I'm open to any tips.
Let's say I want to scroll left. This requires me to press Hyper + Ctrl + Shift + H which seems extremely difficult to do, especially if I then need to move right quickly.

感谢分享,还是希望能添加上linux的

linux下无非就是用 xmodmap
这篇介绍很详细 https://www.cnblogs.com/yinheyi/p/10146900.html
以下这个配置我比较了若干,然后发现最佳的,和这里是一样的配置.还是希望能继续Linux的,这样以后3平台都以这里为准。就不用一人一种配置了。(vscode实在是没发现怎么用内置的来让capslock,所以只能ahk了吗)

keysym h = h H Left
keysym l = l L Right
keysym k = k K Up
keysym j = j J Down
keysym u = u U Prior
keysym i = i I Home
keysym o = o O End
keysym p = p P Next

Mouse Backward and Forward do not work as expected

Hi,

Thanks for sharing these excellent key mappings that greatly increase my productivity!

I would like to report that all shortcuts to trigger the mouse backward and forward do not work even though they are recognised in Karabiner-EventViewer.

The gif below shows the key mapping - 🖱️B and +🖱️F cannot simulate the mouse backward and forward despite being recognised by Karabiner. This problem persists on Apple Applicaitons. For example, Safari and Finder. However, they work perfectly on Firefox and Pycharm.

Screenshots
This screenshot is captured without any mouse connected. It is converted from a 30s video which is also uploaded to dropbox.

The file structure in the screenshot is that Test1 contains a subfolder called Test2 that also contains a subfolder called Test3. At the time of recording, Test3 and Test1 have been viewed so that the < and > buttons are not greyed.
Button_4_and_5_issue

Desktop

  • macOS: 13.2.1
  • Karabiner: 14.11.0
  • Capslock: MacOS v3

Readme 里面F15的描述和实际功能不一致

Readme里面写的是Play or Pause,但我看代码其实是mute,这两者还是有点区别的。Mute对应的是F10,而Play or Pause则是暂停播放设备,理论上应该和F8的code一样。

keyFunc_esc

请问可以实现esc这样的效果吗?比如按下caps_space=keyFunc_esc。想用cap和space代替esc,但好像这样写并不行,这个keyFunc是内置的吗?可以自定义吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.