pqrs-org / karabiner-archived Goto Github PK
View Code? Open in Web Editor NEWKarabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
Home Page: https://pqrs.org/osx/karabiner/
License: The Unlicense
Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
Home Page: https://pqrs.org/osx/karabiner/
License: The Unlicense
I've been experiencing unusually long shutdowns since installed kr4mb.
Instead of the usual 3s shutdown, I get a gray screen with the standard spinning loader. It takes something like 15s.
What makes me believe this to be related with kr4mb is the fact this doesn't happen whenever I update kbr4mb, and the kext or server or whatever are (I guess) disabled until I restart the macbook.
Thanks
I've notice there are some settings in checkbox.xml for changing caps lock key. (inside vendor specific devices)
In the "Change Caps Lock section" though, is says PCKeyboardHack has to be used.
Why this contradiction?
Once the key is locked, ReloadXML from the preference pane can be used to restore things to normal state.
This bug is actually more general - it applies to all modifier keys. I find myself triggering it more often for shift, because my fingers are severely conditioned to press both shifts when typing strings like C++ or SOME_CONST.
This behavior is present on my machine in both 7.4.0 (stable) and 7.4.17 (beta).
Kernel Version:
10.5.0 Darwin Kernel Version 10.5.0: root:xnu-1504.9.17~1/RELEASE_I386 i386
Keyboard:
Microsoft Natural Ergonomic Keyboard 4000 v1.0
My configuration is very simple:
<?xml version="1.0"?>
<root>
<list>
<item>
<name>Command_L to Control_L (except virtual machine, RDC, VIM)</name>
<identifier>private.commandL2controlL_vm</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, VI</not>
<autogen>--KeyToKey-- KeyCode::COMMAND_L, KeyCode::CONTROL_L</autogen>
</item>
<item>
<name>Control_L to Command_L (except Virtual Machine, RDC, VIM)</name>
<identifier>private.controlL2commandL_exvm</identifier>
<not>VIRTUALMACHINE, REMOTEDESKTOPCONNECTION, VI</not>
<autogen>--KeyToKey-- KeyCode::CONTROL_L, KeyCode::COMMAND_L</autogen>
</item>
</list>
</root>
The preset settings are very huge.
Loading preset settings spents CPU and memory and time.
This option is very useful for user who uses only private.xml.
Was thinking space you be a nice key to use as mouse click.
If we could detect if the trackpad is being used, and make space act as mouse click, it would not conflict with anything.. right?
Add <volume_upper>, <volume_lower> filter which look audio volume.
They makes the following setting.
<volume_lower>20</volume_lower> <autogen>ConsumerToKey ConsumerKeyCode::VOLUME_DOWN, ConsumerKeyCode::VOLUME_DOWN, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L</autogen>
If you keep some key pressed (is such a way it send repeated keydown events), and then activate a VK_LAZY_modifier, the modifier is never triggered.
I don't know if it was mean't to be like this on purpose, but I'm currently suffering from the lack of activation of the modifier in this situation.
cheers
It would be really cool to have an external configuration file with a list of all the checked options.
Purpose:
Updated to OS X 10.8 Mountain Lion Developer Preview 2 and it seems like the remapping i had for Caps Lock to ESC isnt working anymore.
SimultaneousKeyPresses can only two key arguments in the moment.
Expand the number of arguments into three or uppper.
I believe there is a room to reduce memory usage by optimizing initialize_vector holding way.
I have a KeyOverlayModifier that sets KeyCode::COMMAND_L while the key is down.
Is there a way of unsetting the Command_L using another KeytoKey or something like that triggered by another key?
Trying to install checkbox.xml but it seems the cp command is failing?
$ make install
./scripts/conv.rb checkbox.xml
./scripts/lint.rb
sudo cp number.xml output/checkbox.xml /Library/org.pqrs/KeyRemap4MacBook/prefpane
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory
make: *** [install] Error 64
I''m using
--KeyOverlaidModifier-- KeyCode::SPACE, KeyCode::VK_CONFIG_SYNC_KEYDOWNUP_notsave_simultaneouskeypresses_vimode , KeyCode::SPACE
to activate simultaneous vimode.
When I release space, after performing some action, space is not sent, just as expected.
There is an exception tough:
I'm using SimultaneousViMode to activate PointToScroll, and when I scroll fast, I get Space sent in the end which makes the page jump down.
The last keycode of --KeyOverlaidModifier-- is canceled either by timeout or by pressing a different key in the meanwhile.
What I would like is for the PointToScroll feature to cancel it as well.
Is this possible?
At the moment, multi-touch extension can activate only one setting at the same time.
It should be able to activate multiple settings for convenience.
For example, two settings are activated by one finger.
Note: I doesn't happen with A
Like ApplicationType, DeviceVendorID, separate InputMode definition to XML.
Keyremap4macbook: 2.7.50
OSX: 10.6.7
Growl: 1.2.1
The package throws the following error message:
The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
Ok, here is the problem:
While having Space as Key Overlay Modifier to turn on Simultaneous Vi Mode, when writing text too fast, some people actually press the key after space, while having space still pressed.
You can imagine the frustration of someone writing this post, and having Chrome accidentally quit, by pressing Space+Q (accidentally).
One way to fix this problem, would be having a initial adjustable kick in period on Key Overlaid Modifier (short like 50ms or so), during which, if any other key is pressed, the overlay modifier is ignored and the normal key is sent, followed by the other key.
So, if someone pressed Q after Space too quickly (quickly enough to press Q while Space is down), Space is sent (ignoring the overlay modifier), followed closely by Q.
Is this hard to implement?
If you activated followings settings at same time,
(2) is ignored because KeyRemap4MacBook changes space key to tab by (1).
(1) Space to Tab
(2) Space to Return
In above situation, show caution icon (conflicted icon) beside (1) and (2).
The KeyCode.data file doesn't appear to reflect the rearranged keys on the 2011 Macbook Air (and presumably post-Lion external keyboards).
The new App Store button maps to the number 131, which isn't represented in the table.
The new Mission Control button maps to the number 160, which is currently EXPOSE_ALL in the table; Expose remaps (both the built in and custom bindings) do not appear to work at all.
Add an option that KeyRemap4MacBook stops modifying key events
when Synergy is running on Mac OS X and the cursor goes to another machine.
Hi there,
I'm relatively new to Mac and I think this tool rocks!
One thing that I haven't found a way to do is tell Mac OS X that I don't want to be able to write special characters when I use option + shift, especially on the left hand side. I'd like to use that combination for shortcuts in my IDE.
Is that possible to do with KeyRemap? Or is there a better suggested solution?
Thanks for creating this awesome tool and for your help!
When I quit the multi touch extension tool, it stops working..
any way of make it run in the background like kr4mb?
It is currently not possible to map keys specific to any Vendor/Device, just for the ones defined in the data file.
Allowing them to be specified as a hex code rectifies this.
Example:
<item>
<name>Command+CursorMove to ScrollWheel</name>
<identifier>remap.ag5.pointing_relative_command_to_scroll</identifier>
<autogen>--PointingRelativeToScroll-- PointingButton::NONE, VK_COMMAND</autogen>
<device_only>DeviceVendor::0x0510, DeviceProduct::0x100b</device_only>
</item>
I may also have configured my keyremap improperly, but for now this is what I'm experiencing.
I have remapped my keys as can be seen in the screenshot, i.e. swapped fn and control_l and adjusted F1..12 keys accordingly.
Now I'm getting interesting behavior:
The F keys that do work as expected, i.e. I press the former control_l key (new fn key) and the F-button and get the special functionality (e.g. brightness adjustment) and if I press the former fn (new control_l key) and the F-button I do not get the special functionality triggered, are:
F1, F2, F4
The other ones
F3, F5, F6, F7, F8, F9, F10, F11, F12
trigger the special functionality BOTH with pressing control_l AND fn buttons. So the swapping doesn't seem to be picked up, or rather the control_l button doesn't seem to lose its special "fn" meaning to the Mac OS.
I'm using Mac OS X Lion (most up to date version) and the current version of KR4MB (7.5.0).
Please let me know if there is something I'm overlooking in my config. But if not I'd be happy if you could fix that. Or even advise me on where I'd have to look to find that functionality in the code so I could have a try with creating a patch for you. (Though I have zero experience with Obj-C, only C++, C and mostly Java otherwise :))
Thanks!
-- Denis
Hi. Thanks for such a useful application!
I have a problem which prevents me from using my Emacs setup the way I've used to. I always plugged my MNE 4000 keyboard into the macbook air and had the KeyRemap4MacBook to remap left Alt as command and right Alt as Control (and then 'ctrl will be Meta in Emacs). But for some mysterious reason it suddenly stopped working (after I've moved to another apartment :) ).
Now, when I launch the EventViewer it shows that both left and right Alts are "0x37 Command_L". I think, it should be shown as Command_R in order for my setup to work as it used to.
I've tried to reboot, plug/unplug the keyboard, reinstall/delete completely IntelliType For Mac (yes, it used to work with it installed), delete/reinstall/install various versions of KeyRemap4MacBook - but to no avail. However, sometimes after a reboot right Alt would be shown as Opt_R in EventView and then after a couple of pushes or switches to another apps will be Command_L again.
I get none of the *_R keys - right Ctrl is shown as Control_L in EventViewer.
This all looks very strange to me, I'd be so grateful for the help!
Write "About event handling (kext)".
First, thanks for the awesome plugin :-D
I was trying to remap my escape key to fn key but noticed a quirky behavior in v7.5.61. My setup (Lion, Macbook Pro 2010) is using F1 ... F12 as the default mac bindings (e.g. F1 turns down the brightness, F2 turns up the brightness, etc). To narrow down the behavior I chose the default "Backslash() to Fn" checkbox in KeyRemap (although it appeared to happen with any key whose function was trying to emulate fn), then press the combo +Control_L+F12 which should be the same as Fn+Control_L+F12 but the two are not showing up the same way in EventViewer. This seems to be a problem with the OS interpreting the fn key differently, perhaps?
This problem was once discussed by email.
Simultaneous Vi Mode is getting more usable now, with most of is quirks getting solved.
Although, there is still one last thing that is killing me.
As you know, I've set the ASDF line with KeyOverlayModifiers to Shift, Control, Option and Command.
On the release of each key, if the modifier has not been used, they send instead ctrl+s, cmd+x, cmd+c, cmd+v.
The more I use it, the faster I start pressing the keys, and eventually end up releasing the Space (the key I'm using to enable the mode) before releasing ASDF keys. Just like you probably do when pressing cmd+c (you release cmd before c without noticing).
What is happening right now (I suspect) is that the release of the Space key, is telling the KeyOverlayModifiers that other key has been pressed, and there is no reason to send the final key (cmd+c).
If this didn't happen, the final key would be released normally.
I believe there is no reason for the release of Space (a KeyOverlayModifier in this case) cause other modifiers to be considered as used, since a Space char wasn't sent after all, and there is no reason for a modifier modify other modifier.
So perhaps if we could prevent the modifier's release from causing KeyOverlayModifiers to not send the final key, this problem could be solved. If I think about it, it doesn't make much sense that a modifier has effect on other modifier release, so the first one shouldn't be considered used, and the final key should be sent.
I suspect the text is a bit confusing although my tries to make it understandable.
Please ask anything you can't get.
I hope this is not too hard to fix... ;)
I've been trying (with a combination of KeyRemap4MacBoom and PCKeyboardHack) to get my Caps Lock to behave as a backspace when tapped a la the default setting of PCKH (for Colemak), but act as Ctrl when held (for vim/emacs/console, etc).
I had a friend (who isn't contactable for a year or so) show me that he managed to set that up (and I think he was using your software) by routing backspace to a different key (like "PC key") and then configuring that key to work differently based on whether it was a tap or a hold.
Now, for the life of me, I can't seem to understand the documentation or find good examples in the bundled settings in a way that has let me get a working solution.
So, a) is this possible with KR4M, and b) if so, are you able to nudge me in the right direction to figure this out?
I'm having a problem specifically with u/o to delete/space on homerow mode.
If I release space while U is being press down, U gets sent even after behing released, causing the repeater to kick in.
This doesn't happen however if space is released after the U's overlaid modifier is already out of modifier (by timeout) into the final keystoke/repetition.
So, to reproduce this condition, U has to be released right after Space, while U is still in the modifier state.
At first glance I would say it's either related with the vk_config getting turned off or with the KeyOverlaidModifier of Space getting set while the U's is still in modifier mode
I would dig more into this problem but my understanding of the guts of KR4MB is very limited
Hi there,
for now, you choose the mappings for all installed keyboards, except this one option to let the "onboard" keyboard unaffected. I was wondering if it would be better to a have a list of installed keyboards first, selecting one there and then set the mappings for the selected keyboard.
I often run into this problem, that I do a mapping for one keyboard (switch cmd + alt keys on my MS external keyboard) but that also changes my internal keyboards mappings which I don't want.
It would also be a good option to provide Global keyboard mappings (as it is now). So, I would like to have some sort of keyboard selection with a global option in front of the keyboard mappings. With the global option as default, this would be backwards compatible.
Thanks
gossi
I was looking at the keycode lists to set up the private.xml file, but the values in the documentation won't work. This may only afflict the "consumer keys", but this is what I found; in the documentation ( https://github.com/tekezo/KeyRemap4MacBook/blob/master/src/core/bridge/keycode/data/ConsumerKeyCode.data ), the codes are like this:
MUSIC_PREV 20
But the symbols required in private.xml are like this:
VK_CONSUMERKEY_MUSIC_PREV
I don't even remember where I found that definition. Overall, it's not clear when we need to use VK_* symbols or the plain ones. For example, CURSOR_LEFT works fine (it's not VK_CURSOR LEFT).
Move them into external XML files like checkbox.xml.
An example of XML file.
<appdef> <appname>EMACS</appname> <equal>org.gnu.Emacs</equal> </appdef> <appdef> <appname>VI</appname> <prefix>org.vim.</prefix> </appdef> <appdef> <appname>VIRTUALMACHINE</appname> <equal>com.vmware.fusion</equal> <prefix>com.vmware.proxyApp.</prefix> <equal>com.parallels.desktop</equal> <equal>com.parallels.vm</equal> <equal>com.parallels.desktop.console</equal> </appdef>
Just after cloning the repo
version 7.2.45
** BUILD FAILED **
The following build commands failed:
KeyRemap4MacBook_server:
ProcessInfoPlistFile /Users/ioio/Sites/KeyRemap4MacBook/src/core/server/build/Release/KeyRemap4MacBook_server.app/Contents/Info.plist Info.plist
(1 failure)
make: *** [all] Error 1
Has anyone been able to map custom key combinations to VolumeUp or Down?
I have a Dell PC keyboard hooked up to my laptop and I want to be able to use some key combination to change the volume. I've tried the rules below but nothing seems to work:
Right Ctrl key plus Home key
<item>
<name>Ctrl + Home to Volume Up</name>
<identifier>remap.CTRLHome_to_volumeup</identifier>
<autogen>--KeyToConsumer-- KeyCode::HOME, ModifierFlag::CONTROL_R, ConsumerKeyCode::VOLUME_UP</autogen>
</item>
Map F13 (aka Print Screen) to Fn and then use Fn+F11&12 for volume control
<item>
<name>Fn to F13</name>
<identifier>remap.fn2f13</identifier>
<autogen>--KeyToKey-- KeyCode::FN, KeyCode::F13</autogen>
</item>
<item>
<name>F13+F11 to Volume Down</name>
<identifier>remap.F13F11_to_volumedown</identifier>
<autogen>--KeyToConsumer-- KeyCode::F11, ModifierFlag::F13, ConsumerKeyCode::VOLUME_DOWN</autogen>
</item>
I recognize that I'm missing something basic here about how the Volume mapping might work. Thanks for any advice.
Synchronize the CapsLock LED and the status of Input Source.
Turn LED off when input source is U.S.
Turn LED on when input source is French.
Merge this changes.
https://github.com/Hacci/KeyRemap4MacBook/
When user types CapsLock, "a" is input repeatedly.
http://groups.google.com/group/keyremap4macbook/browse_thread/thread/4c6859a3920b1be2
http://groups.google.com/group/keyremap4macbook/browse_thread/thread/fb34ce57827fca23
I think calling "setAlphaLock" method causes this problem.
https://github.com/tekezo/KeyRemap4MacBook/blob/master/src/core/kext/util/ListHookedKeyboard.cpp#L331
Change menu bar color like DrasticInputSourceStatus.
http://pqrs.org/macosx/DrasticInputSourceStatus/index.html
Have you tested with Lion?
I just updated, but Tabmode and Home Row mode don't work..
This is potentially a regression from 7.5 to 7.6/7.7. When having Option+Tab to Command+Tab enabled, moving the mouse will choose the currently activated application (in the app switcher), similar to the effect of clicking an app in the switcher. This happens regardless of the setting "Don't restore modifiers in the mouse events". The event viewer shows keyMod 0x0 for Opt when the mouse is moved:
-- initiate app switching --
eventType:keyMod code:0x3a name:Option_L flags:Opt misc:characters:
eventType:keyMod code:0x3a name:Option_L flags: misc:characters:
eventType:keyMod code:0x37 name:Command_L flags:Cmd misc:characters:
-- move mouse --
eventType:keyMod code:0x0 name: flags:Opt misc:characters:
I was trying to improve the current pointing to scroll movement.
There are 2 problems that need to be solved
1. Momentum scroll only makes sense when using the trackpad, not with the mouse
I notice currently we are intercepting values from cursor.
We need to know when the user removes the finger from the trackpad, while scrolling in order to trigger the momentum, otherwise, we have momentum always, and that is not desirable.
2. Tracking Speed and Scrolling Speed, are adjustable separately in the apple preferences panel.
When the user has a tracking speed different from the scrolling speed, the speed of the cursorToScroll is going to be different from the normal scrolling speed, and equal to the tracking speed.
This can, however, be corrected in KeyRemap4Macbook preferences. The problem is apple has a strange acceleration curve, and when the CursorMove to ScrollWheel Rate is decreased, it reduces the movement in a linear way, witch causes slow movements, to be too slow and even to don't move the scroll at all.
Solutions
The best solution for both the problems would be to read the values directly from the devices, (like Steer Mouse, Usb Overdrive, Jitouch, etc... do), instead of intercepting the pointer movement. This is related with access for assistive devices since this option has to be enabled for these apps to work (Preferences>Universal Access>Enable access for assistive devices)
Otherwise, there is no solution from problem 1 (we have to disable momentum scroll), and for problem 2, we have to try and implement the strange acceleration curve apple uses (which I can predict to be extremely hard).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.