Giter Club home page Giter Club logo

cmd-key-happy's Introduction

Build Status

Swap cmd and alt (or command and option) keys in Mac OS X (macOS).

This program allows you to swap the command and alt (or option) keys in any application, but in particular Terminal.app. This can be extremely handy when ssh'ing into other UN*X boxes and running "emacs -nw". It also allows you to have the traditional readline navigation work properly when using Bash (i.e., alt-backspace, alt-f, alt-b, etc) in the Terminal.

The decision to swap the keys is based on a customizable script (Lua). This script allows you to exclude certain key combinations per application, or globally. For example, "cmd-tab" is an exclusion in my Lua script regardless of which application is running, as I still want this key combination to cycle the active set of applications. I have "cmd-c" and "cmd-v" as exclusions when the front most application is the Terminal -- these combinations are so universal that I find it easier to leave them as they are -- but all other key combinations involving the cmd key get swapped with alt.

The motivation for this program was the many years of hitting alt- in Linux only to find that it does not generate the same behaviour in Terminal.app. Having the ability to run "emacs -nw" from within Terminal.app is now useable!

Mavericks

If you upgrade to Mavericks you'll get the following error "failed to create event tap!" when cmd-key-happy starts. The granularity of using the accessibility APIs which is what cmd-key-happy depends on is both different and now much finer. To fix this please reread the INSTALL file.

Note (1 Feb 2017): I rewrote this in C++ (see cpp directory) some years ago and it is probably the better implementation for newer versions of macOS but I never promoted it as I have stopped using macOS on a regular basis.

cmd-key-happy's People

Contributors

frobware avatar scgilardi 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

cmd-key-happy's Issues

Not working with Mavericks

I have completely uninstalled and rebuild from source on 10.9.

Assistive support is enabled in the new location (under 'Privacy').

I'm getting this error:

/var/log/system.log:Oct 22 16:25:16 phineas.home.genehack.org cmd-key-happy[4771]: error: failed to create event tap!

Get the same error trying to run interactively:

% cmd-key-happy                                                                                                                                                                                                       16:27:13
2013-10-22 16:29:16.880 cmd-key-happy[5947:507] error: failed to create event tap!

Happy to help with whatever debugging needs to be done...

cmd-space syntax is not documented

I'd like to add an exception for cmd-space for Terminal.app so that I can call Spotlight with the normal keyboard shortcut.

I've tried a few different things and none of them have worked.

It would be great if an example of how to do this could be added to the comments in the example config.

Thanks!

Launching cmd-key-happy via launchd in Mavericks

Not calling AXAPIEnabled in Mavericks prevents cmd-key-happy from requesting accessibility access, which somehow prevents cmd-key-happy from creating event taps when launched via launchd.

Steps to reproduce the problem:

  1. Use a fresh Mavericks install which cmd-key-happy has never been installed.
  2. Install cmd-key-happy; add e.g. Terminal.app to allow apps for accessibility access.
  3. Run cmd-key-happy in a terminal and get no errors.
  4. Stop the previous cmd-key-happy process, run cmd-key-happy-restart instead.
  5. syslog | grep cmd-key-happy.

The "failed to create event tap" error will show up in step 5 while cmd-key-happy does not show up in the list of apps requesting access.

However, if one reverts to the older version of cmd-key-happy.m by commenting the lines 481 and 492 and removing -Werror from Makefile, the resulting cmd-key-happy executable will request access (probably when AXAPIEnabled is called?) and show up in the list of apps. After giving cmd-key-happy the access, one will be able to launch it via launchd.

Program doesn't start automatically for me

I performed the "have more time" steps in the INSTALL and if I open a terminal and start cmd-key-happy like "$> cmd-key-happy &", it works great. But, it seems like from the install it's supposed to be running as a service. I'm a bit new to Mac's unix flavor so I'm not sure what to expect there. I'm running Mavericks and have the error in the /var/log about "error: failed to create event tap!". I read through issue #8 and my problem seems similar but mine never starts automatically. And I didn't see a solution there if there was one.

Problem on mavericks

There seems to be a bug with the latest version installed on mavericks 10.9.5. cmd-key-happy seems to work with the exception that when cmd-w is removed from the exclusion list for Terminal in the .cmd-key-happy.lua file, this exclusion is not respected.

Normal mac behavior dictates that cmd-w closes a tab ... after cmd-key-happy-restart, cmd-w still prompts to close the tab. This poses problems in emacs -nw when trying to copy a region, M-w is copy region by default.

I reinstalled my old binaries that were compiled under snow leopard (recompiling the old version under mavericks failed). The old previously compiled version seems to respect the exclusion and works okay! Not sure about version info but the tar ball was called aim-stuff-cmd-key-happy-a456aa9.tar.gz ...

Broken in 10.9.2 update

I don't even get debug output when I've got a print statement in swap_keys().

Running cmd-key-happy-ff gives:

dtrace: invalid probe specifier
pid$1:cmd-key-happy:$2:entry
{
    self->trace = 1;
}

pid$1:cmd-key-happy:$2:return
/self->trace/
{
    self->trace = 0;
}

pid$1:cmd-key-happy::entry,
pid$1:cmd-key-happy::return
/self->trace/
{
}
: invalid probe description "pid$1:cmd-key-happy:$2:entry": Undefined macro variable in probe description

Happy to help with further testing... 8^|

cmd-key-happy stops working

This is a crappy bug report, but since it's happened to me twice, I figured I'd report it, and hopefully it would ring some bells. Running Lion, cmd-key-happy is working just fine, but at some point, cmd and option revert to their stock meaning. None of the following fix it:

  • launchctl stop/start
  • launchctl stop, run in shell
  • quit/re-run Terminal
  • sleep/wake
  • switch to login window and back

I need to do a full shutdown and restart of the machine, then everything is back to normal. I realized I have not tried logging out and back in again. I will do that next time, although this is as destructive to my running session as a restart, so it's not a great answer.

I regularly sleep and resume my laptop, and connect and disconnect an external keyboard and monitor, if any of these could be a problem.

Is there anything I can try?

cmd-key-happy can't swap alt/cmd in NX on Lion

I've just upgraded to Lion, and unfortunately cmd-key-happy doesn't seem to be able to swap keys in NX anymore. The NX client I use is here:
http://www.nomachine.com/preview/download-package.php?Prod_Id=13
Mind you, I'm completely willing to believe that this is due to a change on the NX side, but I'm not sure.

I'd also be happy to discover that I wasn't specifying the appname correctly: from my 7 seconds of googling, it looks like I should be doing
["NX Player for OS X"] = { ... }
but if it's as simple as changing the syntax, I'll do a little dance.

One last related question: there are obviously some debugging print statements in the example lua config, but uncommenting them doesn't seem to print anywhere I can find. Where are those intended to be found?

cmd-key-happy keeps crashing on Lion

I upgraded to Lion about two months ago and have been having problems with cmd-key-happy ever since. It will occasionally crash. I have pasted the latest crash log below. Note parent process is tcsh because launchd doesn't restart the crashed process (should it?) so I've resorted to running it backgrounded in a terminal shell as a stopgap measure.

Anyone else having problems like this?

Process: cmd-key-happy [31156]
Path: /usr/local/bin/cmd-key-happy
Identifier: cmd-key-happy
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: tcsh [356]

Date/Time: 2011-12-20 10:42:48.692 -0500
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
__TEXT 000000010d633000-000000010d65d000 [ 168K] r-x/rwx SM=COW /usr/local/bin/cmd-key-happy

Application Specific Information:
objc[31156]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff8bbcdc92 CFDataGetBytePtr + 18
1 cmd-key-happy 0x000000010d6351df translateKeycode + 95
2 cmd-key-happy 0x000000010d6349ba handleEvent + 362
3 com.apple.CoreGraphics 0x00007fff891d4477 processEventTapData + 734
4 com.apple.CoreGraphics 0x00007fff891d31fd _CGXPostEventTapData + 184
5 com.apple.CoreGraphics 0x00007fff89596822 _XPostEventTapData + 256
6 com.apple.CoreGraphics 0x00007fff895966f1 CGXEventTap_server + 146
7 com.apple.CoreGraphics 0x00007fff891d3e12 eventTapMessageHandler + 30
8 com.apple.CoreFoundation 0x00007fff8bbba2b2 __CFMachPortPerform + 386
9 com.apple.CoreFoundation 0x00007fff8bbba11c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 44
10 com.apple.CoreFoundation 0x00007fff8bbb9e4b __CFRunLoopDoSource1 + 155
11 com.apple.CoreFoundation 0x00007fff8bbf0587 __CFRunLoopRun + 1895
12 com.apple.CoreFoundation 0x00007fff8bbefae6 CFRunLoopRunSpecific + 230
13 com.apple.Foundation 0x00007fff8eb2104f -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 267
14 com.apple.Foundation 0x00007fff8eb20f3b -[NSRunLoop(NSRunLoop) run] + 62
15 cmd-key-happy 0x000000010d635130 main + 944
16 cmd-key-happy 0x000000010d634844 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8b4787e6 kevent + 10
1 libdispatch.dylib 0x00007fff8800d5be _dispatch_mgr_invoke + 923
2 libdispatch.dylib 0x00007fff8800c14e _dispatch_mgr_thread + 54

Thread 2:
0 libsystem_kernel.dylib 0x00007fff8b478192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff88289594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8828ab85 start_wqthread + 13

Thread 3:
0 libsystem_kernel.dylib 0x00007fff8b478192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff88289594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff8828ab85 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x2b47b4c4bf7f9540 rdx: 0x00007fff7831b120
rdi: 0x0000000000000000 rsi: 0x00007fff7831c480 rbp: 0x00007fff6d2296f0 rsp: 0x00007fff6d2296e0
r8: 0x00000000000000c8 r9: 0x00007fff7831c490 r10: 0x0000000000000040 r11: 0x0000000000000000
r12: 0x000000010d76aa90 r13: 0x000000010d722210 r14: 0x000000010d778250 r15: 0x0000000000000000
rip: 0x00007fff8bbcdc92 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Logical CPU: 0

Binary Images:
0x10d633000 - 0x10d65cfff +cmd-key-happy (??? - ???) /usr/local/bin/cmd-key-happy
0x7fff6d233000 - 0x7fff6d267ac7 dyld (195.5 - ???) /usr/lib/dyld
0x7fff87a22000 - 0x7fff87a49ff7 com.apple.PerformanceAnalysis (1.10 - 10) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis
0x7fff87a9f000 - 0x7fff87aa1fff libquarantine.dylib (36.0.0 - compatibility 1.0.0) <4C3BFBC7-E592-3939-B376-1C2E2D7C5389> /usr/lib/system/libquarantine.dylib
0x7fff87aa2000 - 0x7fff87abfff7 libxpc.dylib (77.17.0 - compatibility 1.0.0) <72A16104-2F23-3C22-B474-1953F06F9376> /usr/lib/system/libxpc.dylib
0x7fff87ac2000 - 0x7fff87ac8fff com.apple.DiskArbitration (2.4.1 - 2.4.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff87c9d000 - 0x7fff87cb0ff7 libCRFSuite.dylib (??? - ???) <0B76941F-218E-30C8-B6DE-E15919F8DBEB> /usr/lib/libCRFSuite.dylib
0x7fff8800a000 - 0x7fff88018fff libdispatch.dylib (187.7.0 - compatibility 1.0.0) <712AAEAC-AD90-37F7-B71F-293FF8AE8723> /usr/lib/system/libdispatch.dylib
0x7fff8801f000 - 0x7fff8801ffff com.apple.ApplicationServices (41 - 41) <89B6AD5B-5C75-3E83-8C2B-AA7F4C55E400> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff88021000 - 0x7fff88073ff7 libGLU.dylib (??? - ???) <3C9153A0-8499-3DC0-AAA4-9FA6E488BE13> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff8807a000 - 0x7fff8808cff7 libbsm.0.dylib (??? - ???) <349BB16F-75FA-363F-8D98-7A9C3FA90A0D> /usr/lib/libbsm.0.dylib
0x7fff881df000 - 0x7fff8822aff7 com.apple.SystemConfiguration (1.11.1 - 1.11) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff8822b000 - 0x7fff8822cfff libDiagnosticMessagesClient.dylib (??? - ???) <3DCF577B-F126-302B-BCE2-4DB9A95B8598> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff88239000 - 0x7fff88316fef libsystem_c.dylib (763.12.0 - compatibility 1.0.0) /usr/lib/system/libsystem_c.dylib
0x7fff88317000 - 0x7fff8831bfff libmathCommon.A.dylib (2026.0.0 - compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib
0x7fff8831c000 - 0x7fff884bbfff com.apple.QuartzCore (1.7 - 270.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff88539000 - 0x7fff88544ff7 libc++abi.dylib (14.0.0 - compatibility 1.0.0) <8FF3D766-D678-36F6-84AC-423C878E6D14> /usr/lib/libc++abi.dylib
0x7fff88545000 - 0x7fff8855afff com.apple.speech.synthesis.framework (4.0.74 - 4.0.74) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff8855b000 - 0x7fff8855bfff com.apple.CoreServices (53 - 53) <043C8026-8EDD-3241-B090-F589E24062EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff88657000 - 0x7fff88759ff7 libxml2.2.dylib (10.3.0 - compatibility 10.0.0) <22F1D1B6-1761-3687-9EFD-036EA15FB2E4> /usr/lib/libxml2.2.dylib
0x7fff887bf000 - 0x7fff888a3def libobjc.A.dylib (228.0.0 - compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff888b1000 - 0x7fff88bcdff7 com.apple.CoreServices.CarbonCore (960.18 - 960.18) <6020C3FB-6125-3EAE-A55D-1E77E38BEDEA> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff88ffe000 - 0x7fff89711587 com.apple.CoreGraphics (1.600.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff89712000 - 0x7fff89715fff com.apple.help (1.3.2 - 42) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff89716000 - 0x7fff89755fff com.apple.AE (527.7 - 527.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff89756000 - 0x7fff89d3afff libBLAS.dylib (??? - ???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff89d3b000 - 0x7fff89ddafff com.apple.LaunchServices (480.21 - 480.21) <6BFADEA9-5BC1-3B53-A013-488EB7F1AB57> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff89ddb000 - 0x7fff89e2efff libFontRegistry.dylib (??? - ???) <57FBD85F-41A6-3DB9-B5F4-FCC6B260F1AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
0x7fff89e2f000 - 0x7fff89f32fff libsqlite3.dylib (9.6.0 - compatibility 9.0.0) <7F60B0FF-4946-3639-89AB-B540D318B249> /usr/lib/libsqlite3.dylib
0x7fff89f33000 - 0x7fff89f34fff liblangid.dylib (??? - ???) /usr/lib/liblangid.dylib
0x7fff89f59000 - 0x7fff89f94ff7 libsystem_info.dylib (??? - ???) <9C8C2DCB-96DB-3471-9DCE-ADCC26BE2DD4> /usr/lib/system/libsystem_info.dylib
0x7fff8a00b000 - 0x7fff8a086ff7 com.apple.print.framework.PrintCore (7.1 - 366.1) <3F140DEB-9F87-3672-97CC-F983752581AC> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff8a087000 - 0x7fff8a08ffff libsystem_dnssd.dylib (??? - ???) <998E3778-7B43-301C-9053-12045AB8544D> /usr/lib/system/libsystem_dnssd.dylib
0x7fff8a385000 - 0x7fff8a389fff libdyld.dylib (195.5.0 - compatibility 1.0.0) <380C3F44-0CA7-3514-8080-46D1C9DF4FCD> /usr/lib/system/libdyld.dylib
0x7fff8a38a000 - 0x7fff8a38ffff libcompiler_rt.dylib (6.0.0 - compatibility 1.0.0) <98ECD5F6-E85C-32A5-98CD-8911230CB66A> /usr/lib/system/libcompiler_rt.dylib
0x7fff8a390000 - 0x7fff8a39efff com.apple.NetAuth (3.1 - 3.1) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
0x7fff8b11e000 - 0x7fff8b14bfe7 libSystem.B.dylib (159.1.0 - compatibility 1.0.0) <095FDD3C-3961-3865-A59B-A5B0A4B8B923> /usr/lib/libSystem.B.dylib
0x7fff8b14c000 - 0x7fff8b18cff7 libcups.2.dylib (2.9.0 - compatibility 2.0.0) /usr/lib/libcups.2.dylib
0x7fff8b18d000 - 0x7fff8b194fff com.apple.NetFS (4.0 - 4.0) <433EEE54-E383-3505-9154-45B909FD3AF0> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
0x7fff8b1a2000 - 0x7fff8b1a5fff libCoreVMClient.dylib (??? - ???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
0x7fff8b1b9000 - 0x7fff8b1cdff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) <04C31EF0-912A-3004-A08F-CEC27030E0B2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x7fff8b1ce000 - 0x7fff8b23efff com.apple.datadetectorscore (3.0 - 179.4) <2A822A13-94B3-3A43-8724-98FDF698BB12> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
0x7fff8b23f000 - 0x7fff8b459fef com.apple.CoreData (104 - 358.12) <33B1FA75-7970-3751-9DCC-FF809D3E1FA2> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x7fff8b45a000 - 0x7fff8b460ff7 libunwind.dylib (30.0.0 - compatibility 1.0.0) <1E9C6C8C-CBE8-3F4B-A5B5-E03E3AB53231> /usr/lib/system/libunwind.dylib
0x7fff8b461000 - 0x7fff8b481fff libsystem_kernel.dylib (1699.24.8 - compatibility 1.0.0) /usr/lib/system/libsystem_kernel.dylib
0x7fff8b482000 - 0x7fff8b4a6fff com.apple.Kerberos (1.0 - 1) <1F826BCE-DA8F-381D-9C4C-A36AA0EA1CB9> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff8b4b6000 - 0x7fff8b558ff7 com.apple.securityfoundation (5.0 - 55005) <2814D17E-E6BB-30A2-A62E-2D481AF514F2> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
0x7fff8b559000 - 0x7fff8b55cff7 com.apple.securityhi (4.0 - 1) <7146CB8E-B754-3B0E-A74E-77E9138A81C5> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff8b55d000 - 0x7fff8b55efff libdnsinfo.dylib (395.7.0 - compatibility 1.0.0) <37FEFE78-BCB5-37EC-8E99-747469BCA4C7> /usr/lib/system/libdnsinfo.dylib
0x7fff8b55f000 - 0x7fff8b57cfff libPng.dylib (??? - ???) <3C70A94C-9442-3E11-AF51-C1B0EF81680E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff8b634000 - 0x7fff8b68fff7 com.apple.HIServices (1.10 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff8bbb7000 - 0x7fff8bd8bfff com.apple.CoreFoundation (6.7.1 - 635.15) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff8bd8c000 - 0x7fff8bdcbff7 libGLImage.dylib (??? - ???) <2D1D8488-EC5F-3229-B983-CFDE0BB37586> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff8be0b000 - 0x7fff8be22fff com.apple.CFOpenDirectory (10.7 - 146) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
0x7fff8be31000 - 0x7fff8be3cff7 com.apple.speech.recognition.framework (4.0.19 - 4.0.19) <48607E6E-8612-3267-9184-E948B1863B32> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff8be6e000 - 0x7fff8be73fff libcache.dylib (47.0.0 - compatibility 1.0.0) <1571C3AB-BCB2-38CD-B3B2-C5FC3F927C6A> /usr/lib/system/libcache.dylib
0x7fff8bf0d000 - 0x7fff8bf12fff libpam.2.dylib (3.0.0 - compatibility 3.0.0) /usr/lib/libpam.2.dylib
0x7fff8c236000 - 0x7fff8c252ff7 com.apple.GenerationalStorage (1.0 - 125) <31F60175-E38D-3C63-8D95-32CFE7062BCB> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage
0x7fff8c2dd000 - 0x7fff8c361ff7 com.apple.ApplicationServices.ATS (317.5.0 - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff8c362000 - 0x7fff8c63aff7 com.apple.security (7.0 - 55010) <93713FF4-FE86-3B4C-8150-5FCC7F3320C8> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff8c63b000 - 0x7fff8c641fff libGFXShared.dylib (??? - ???) <343AE6C0-EB02-333C-8D35-DF6093B92758> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
0x7fff8c642000 - 0x7fff8c844fff libicucore.A.dylib (46.1.0 - compatibility 1.0.0) <38CD6ED3-C8E4-3CCD-89AC-9C3198803101> /usr/lib/libicucore.A.dylib
0x7fff8ca38000 - 0x7fff8ce65fff libLAPACK.dylib (??? - ???) <4F2E1055-2207-340B-BB45-E4F16171EE0D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff8ce84000 - 0x7fff8cf90fff libcrypto.0.9.8.dylib (44.0.0 - compatibility 0.9.8) <3A8E1F89-5E26-3C8B-B538-81F5D61DBF8A> /usr/lib/libcrypto.0.9.8.dylib
0x7fff8cfee000 - 0x7fff8d028fe7 com.apple.DebugSymbols (2.1 - 87) /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols
0x7fff8d031000 - 0x7fff8d099ff7 com.apple.audio.CoreAudio (4.0.1 - 4.0.1) <7966E3BE-376B-371A-A21D-9BD763C0BAE7> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff8d09a000 - 0x7fff8d0a4ff7 liblaunch.dylib (392.35.0 - compatibility 1.0.0) <8F8BB206-CECA-33A5-A105-4A01C3ED5D23> /usr/lib/system/liblaunch.dylib
0x7fff8d0a5000 - 0x7fff8d183fff com.apple.ImageIO.framework (3.1.1 - 3.1.1) <13E549F8-5BD6-3BAE-8C33-1D0BD269C081> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff8d1ad000 - 0x7fff8d28efff com.apple.CoreServices.OSServices (478.29 - 478.29) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff8d28f000 - 0x7fff8d291ff7 com.apple.print.framework.Print (7.1 - 247.1) <8A4925A5-BAA3-373C-9B5D-03E0270C6B12> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fff8d35a000 - 0x7fff8d4b3fff com.apple.audio.toolbox.AudioToolbox (1.7.1 - 1.7.1) <4877267E-F736-3019-85D3-40A32A042A80> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff8d554000 - 0x7fff8d587ff7 com.apple.GSS (2.1 - 2.0) <9A2C9736-DA10-367A-B376-2C7A584E6C7A> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
0x7fff8dd7f000 - 0x7fff8dff2fff com.apple.CoreImage (7.82 - 1.0.1) <282801B6-5D80-3E2C-88A4-00FE29906D5A> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage
0x7fff8e11b000 - 0x7fff8e124ff7 libsystem_notify.dylib (80.1.0 - compatibility 1.0.0) /usr/lib/system/libsystem_notify.dylib
0x7fff8e125000 - 0x7fff8e128fff libRadiance.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff8e129000 - 0x7fff8e21efff libiconv.2.dylib (7.0.0 - compatibility 7.0.0) <5C40E880-0706-378F-B864-3C2BD922D926> /usr/lib/libiconv.2.dylib
0x7fff8e22d000 - 0x7fff8e551fff com.apple.HIToolbox (1.8 - ???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff8e552000 - 0x7fff8e605fff com.apple.CoreText (220.11.0 - ???) <4EA8E2DF-542D-38D5-ADB9-C0DAA73F898B> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff8e606000 - 0x7fff8e679fff libstdc++.6.dylib (52.0.0 - compatibility 7.0.0) <6BDD43E4-A4B1-379E-9ED5-8C713653DFF2> /usr/lib/libstdc++.6.dylib
0x7fff8e67a000 - 0x7fff8e6c8fff libauto.dylib (??? - ???) /usr/lib/libauto.dylib
0x7fff8e6c9000 - 0x7fff8e6caff7 libsystem_blocks.dylib (53.0.0 - compatibility 1.0.0) <8BCA214A-8992-34B2-A8B9-B74DEACA1869> /usr/lib/system/libsystem_blocks.dylib
0x7fff8e6da000 - 0x7fff8e75fff7 com.apple.Heimdal (2.1 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
0x7fff8e760000 - 0x7fff8e827ff7 com.apple.ColorSync (4.7.0 - 4.7.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff8ea61000 - 0x7fff8eacbfff com.apple.framework.IOKit (2.0 - ???) <87D55F1D-CDB5-3D13-A5F9-98EA4E22F8EE> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff8eb15000 - 0x7fff8ee2eff7 com.apple.Foundation (6.7.1 - 833.20) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff8ee2f000 - 0x7fff8ee45ff7 com.apple.ImageCapture (7.0 - 7.0) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff8eef8000 - 0x7fff8eefefff IOSurface (??? - ???) <03F95CAC-569C-3573-B3D7-2D211B8BDC56> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
0x7fff8ef06000 - 0x7fff8ef66fff libvDSP.dylib (325.4.0 - compatibility 1.0.0) <3A7521E6-5510-3FA7-AB65-79693A7A5839> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff8ef67000 - 0x7fff8f00bfff com.apple.ink.framework (1.3.2 - 110) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff8f00c000 - 0x7fff8f00dfff libunc.dylib (24.0.0 - compatibility 1.0.0) <337960EE-0A85-3DD0-A760-7134CF4C0AFF> /usr/lib/system/libunc.dylib
0x7fff8f00e000 - 0x7fff8f174fff com.apple.CFNetwork (520.2.5 - 520.2.5) <406712D9-3F0C-3763-B4EB-868D01F1F042> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff8f5a5000 - 0x7fff8f5b3ff7 libkxld.dylib (??? - ???) /usr/lib/system/libkxld.dylib
0x7fff8f88d000 - 0x7fff8f892fff com.apple.OpenDirectory (10.7 - 146) <91A87249-6A2F-3F89-A8DE-0E95C0B54A3A> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
0x7fff8f924000 - 0x7fff8f94fff7 libxslt.1.dylib (3.24.0 - compatibility 3.0.0) <4DB5ED11-004B-36B5-AE5F-2AB714754241> /usr/lib/libxslt.1.dylib
0x7fff9015d000 - 0x7fff90185ff7 com.apple.CoreVideo (1.7 - 70.1) <98F917B2-FB53-3EA3-B548-7E97B38309A7> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff901c2000 - 0x7fff901f2ff7 com.apple.DictionaryServices (1.2.1 - 158.2) <3FC86118-7553-38F7-8916-B329D2E94476> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff9020c000 - 0x7fff90239ff7 com.apple.opencl (1.50.63 - 1.50.63) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
0x7fff90339000 - 0x7fff9033afff libsystem_sandbox.dylib (??? - ???) /usr/lib/system/libsystem_sandbox.dylib
0x7fff90403000 - 0x7fff90404ff7 libremovefile.dylib (21.0.0 - compatibility 1.0.0) <001E87FF-97DF-328D-B22F-16E3ACEF8864> /usr/lib/system/libremovefile.dylib
0x7fff90405000 - 0x7fff9045cfff libTIFF.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff90c93000 - 0x7fff90cfbfff com.apple.CoreSymbolication (2.1 - 71) <0715BF39-D53C-3BFE-BBEA-B8EBF7274850> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication
0x7fff90f27000 - 0x7fff90f3dfff libGL.dylib (??? - ???) <6A473BF9-4D35-34C6-9F8B-86B68091A9AF> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff91157000 - 0x7fff9115eff7 com.apple.CommerceCore (1.0 - 17) <3894FE48-EDCE-30E9-9796-E2F959D92704> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore
0x7fff9115f000 - 0x7fff911c1fff com.apple.coreui (1.2.1 - 164.1) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff911c2000 - 0x7fff912cffff libJP2.dylib (??? - ???) <6052C973-9354-35CB-AAB9-31D00D8786F9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x7fff91666000 - 0x7fff916fcff7 libvMisc.dylib (325.4.0 - compatibility 1.0.0) <642D8D54-F9F5-3FBB-A96C-EEFE94C6278B> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff916fd000 - 0x7fff91780fef com.apple.Metadata (10.7.0 - 627.20) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff917a5000 - 0x7fff917b4ff7 com.apple.opengl (1.7.5 - 1.7.5) <2945F1A6-910C-3596-9988-5701B04BD821> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff917eb000 - 0x7fff91811ff7 com.apple.framework.familycontrols (3.0 - 300) <41A6DFC2-EAF5-390A-83A1-C8832528705C> /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls
0x7fff91812000 - 0x7fff91812fff com.apple.Accelerate (1.7 - Accelerate 1.7) <82DDF6F5-FBC3-323D-B71D-CF7ABC5CF568> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff91813000 - 0x7fff91832fff libresolv.9.dylib (46.0.0 - compatibility 1.0.0) <33263568-E6F3-359C-A4FA-66AD1300F7D4> /usr/lib/libresolv.9.dylib
0x7fff91833000 - 0x7fff9184afff com.apple.MultitouchSupport.framework (220.62.1 - 220.62.1) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
0x7fff91898000 - 0x7fff9189afff com.apple.TrustEvaluationAgent (2.0 - 1) <1F31CAFF-C1C6-33D3-94E9-11B721761DDF> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
0x7fff918bb000 - 0x7fff918c6fff com.apple.CommonAuth (2.1 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
0x7fff918c7000 - 0x7fff918c9fff libCVMSPluginSupport.dylib (??? - ???) <61D89F3C-C64D-3733-819F-8AAAE4E2E993> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
0x7fff918ca000 - 0x7fff918cafff libkeymgr.dylib (23.0.0 - compatibility 1.0.0) <61EFED6A-A407-301E-B454-CD18314F0075> /usr/lib/system/libkeymgr.dylib
0x7fff918cb000 - 0x7fff918cbfff com.apple.audio.units.AudioUnit (1.7.1 - 1.7.1) <04C10813-CCE5-3333-8C72-E8E35E417B3B> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff918cc000 - 0x7fff919d1ff7 libFontParser.dylib (??? - ???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
0x7fff919e7000 - 0x7fff91a29ff7 libcommonCrypto.dylib (55010.0.0 - compatibility 1.0.0) /usr/lib/system/libcommonCrypto.dylib
0x7fff91a2a000 - 0x7fff91a2afff com.apple.Carbon (153 - 153) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff91a7f000 - 0x7fff91b19ff7 com.apple.SearchKit (1.4.0 - 1.4.0) <4E70C394-773E-3A4B-A93C-59A88ABA9509> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff91b1e000 - 0x7fff91b23fff libGIF.dylib (??? - ???) <393E2DB5-9479-39A6-A75A-B5F20B852532> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff91beb000 - 0x7fff927ecff7 com.apple.AppKit (6.7.2 - 1138.23) <5CD2C850-4F52-3BA2-BA11-3107DFD2D23C> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7fff927ed000 - 0x7fff927edfff com.apple.Accelerate.vecLib (3.7 - vecLib 3.7) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff92f27000 - 0x7fff92f2efff libcopyfile.dylib (85.1.0 - compatibility 1.0.0) <0AB51EE2-E914-358C-AC19-47BC024BDAE7> /usr/lib/system/libcopyfile.dylib
0x7fff93187000 - 0x7fff931a4ff7 com.apple.openscripting (1.3.3 - ???) <4FACC89E-FDAA-3CA5-B5CD-1F4EEAEDF7CF> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff931e9000 - 0x7fff931edff7 com.apple.CommonPanels (1.2.5 - 94) <37C6540B-F8D1-355A-806C-F93D8FB522AB> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff931ee000 - 0x7fff93242ff7 com.apple.ScalableUserInterface (1.0 - 1) <33563775-C662-313D-B7FA-3D575A9F3D41> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface
0x7fff93ab0000 - 0x7fff93ad9fff libJPEG.dylib (??? - ???) <64D079F9-256A-323B-A837-84628B172F21> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff93b30000 - 0x7fff93b36fff libmacho.dylib (800.0.0 - compatibility 1.0.0) <165514D7-1BFA-38EF-A151-676DCD21FB64> /usr/lib/system/libmacho.dylib
0x7fff93baa000 - 0x7fff94071fff FaceCoreLight (1.4.7 - compatibility 1.0.0) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight
0x7fff9409e000 - 0x7fff94113ff7 libc++.1.dylib (19.0.0 - compatibility 1.0.0) /usr/lib/libc++.1.dylib
0x7fff9414e000 - 0x7fff94287fef com.apple.vImage (5.1 - 5.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff94288000 - 0x7fff942c9fff com.apple.QD (3.12 - ???) <983D6E1E-B8BD-3260-A960-13727351D867> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff942ca000 - 0x7fff943e2ff7 com.apple.DesktopServices (1.6.1 - 1.6.1) <4418EAA6-7163-3A77-ABD3-F8289796C81A> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff943e3000 - 0x7fff943f5ff7 libz.1.dylib (1.2.5 - compatibility 1.0.0) <30CBEF15-4978-3DED-8629-7109880A19D4> /usr/lib/libz.1.dylib
0x7fff943f6000 - 0x7fff943fbff7 libsystem_network.dylib (??? - ???) <5DE7024E-1D2D-34A2-80F4-08326331A75B> /usr/lib/system/libsystem_network.dylib
0x7fff943fc000 - 0x7fff943fcfff com.apple.vecLib (3.7 - vecLib 3.7) <9A58105C-B36E-35B5-812C-4ED693F2618F> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fff943fd000 - 0x7fff94421ff7 com.apple.RemoteViewServices (1.2 - 39) <862849C8-84C1-32A1-B87E-B29E74778C9F> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices
0x7fff94422000 - 0x7fff9448aff7 com.apple.Symbolication (1.2 - 89) <1D7F9E72-B1B6-30CF-AC8A-23A763930A92> /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 2
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 60279
thread_create: 1
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=137.6M resident=95.3M(69%) swapped_out_or_unallocated=42.4M(31%)
Writable regions: Total=46.3M written=976K(2%) resident=17.6M(38%) swapped_out=0K(0%) unallocated=28.7M(62%)

REGION TYPE VIRTUAL
=========== =======
CG shared images 96K
CoreServices 2568K
MALLOC 20.5M
MALLOC guard page 32K
STACK GUARD 56.0M
Stack 9752K
VM_ALLOCATE 16.0M
__CI_BITMAP 80K
__DATA 11.8M
__IMAGE 1256K
__LINKEDIT 47.5M
__TEXT 90.1M
__UNICODE 544K
mapped file 16.5M
shared memory 308K
=========== =======
TOTAL 272.8M

Pledgie broken?

Can't tell if it's a pledgie problem or if it's a frob@pledgie problem...

image

plist does not use INSTALL_ROOT

This tool is just what I needed. Thanks!

A minor quibble: com.frobware.cmd-key-happy.plist is hardcoded to load cmd-key-happy from /usr/local/bin instead of INSTALL_ROOT/bin.

This patch configures the plist to use INSTALL_ROOT.

diff --git a/Makefile b/Makefile
index a205733..89d8f0a 100644
--- a/Makefile
+++ b/Makefile
@@ -73,7 +73,7 @@ install-plist:
        mkdir -p $(LAUNCHD_AGENTS_DIR)
        -launchctl stop $(LAUNCHD_LABEL)
        -launchctl unload $(LAUNCHD_AGENTS_DIR)/$(LAUNCHD_LABEL).plist
-       cp $(LAUNCHD_LABEL).plist $(LAUNCHD_AGENTS_DIR)
+       sed -e 's~%INSTALL_ROOT~$(INSTALL_ROOT)~' $(LAUNCHD_LABEL).plist > $(LA        launchctl load -S Aqua $(LAUNCHD_AGENTS_DIR)/$(LAUNCHD_LABEL).plist
        launchctl start $(LAUNCHD_LABEL)

diff --git a/com.frobware.cmd-key-happy.plist b/com.frobware.cmd-key-happy.plisindex 788d970..99bcac7 100644
--- a/com.frobware.cmd-key-happy.plist
+++ b/com.frobware.cmd-key-happy.plist
@@ -5,7 +5,7 @@
        <key>Label</key>
        <string>com.frobware.cmd-key-happy</string>
        <key>Program</key>
-       <string>/usr/local/bin/cmd-key-happy</string>
+       <string>%INSTALL_ROOT/bin/cmd-key-happy</string>

can't swap alt/cmd in OSX 10.8.3

Hi Guys,

I've successfully builded cmd-key-happy binary in my OSX 10.8.3 box, turned on "Enable access for assistive devices" in System Preferences -> Universal Access and checked "Use option as meta key" in terminal preferences; I've then fired it with

./cmd-key-happy -d -f example-rcfile.lua

in a terminal window and opened a new one trying some keybindings (cmd-f, cmd-b, ...) with no success; alt-f, alt-b is working as expected instead. No diagnostic messages in stdout / syslog.

Any experience ?
Best.

plist does not use INSTALL_ROOT

A minor quibble: com.frobware.cmd-key-happy.plist is hardcoded to load cmd-key-happy from /usr/local/bin instead of INSTALL_ROOT/bin.

This patch configures the plist to use INSTALL_ROOT.

diff --git a/Makefile b/Makefile
index a205733..89d8f0a 100644
--- a/Makefile
+++ b/Makefile
@@ -73,7 +73,7 @@ install-plist:
        mkdir -p $(LAUNCHD_AGENTS_DIR)
        -launchctl stop $(LAUNCHD_LABEL)
        -launchctl unload $(LAUNCHD_AGENTS_DIR)/$(LAUNCHD_LABEL).plist
-       cp $(LAUNCHD_LABEL).plist $(LAUNCHD_AGENTS_DIR)
+       sed -e 's~%INSTALL_ROOT~$(INSTALL_ROOT)~' $(LAUNCHD_LABEL).plist > $(LA        launchctl load -S Aqua $(LAUNCHD_AGENTS_DIR)/$(LAUNCHD_LABEL).plist
        launchctl start $(LAUNCHD_LABEL)

diff --git a/com.frobware.cmd-key-happy.plist b/com.frobware.cmd-key-happy.plisindex 788d970..99bcac7 100644
--- a/com.frobware.cmd-key-happy.plist
+++ b/com.frobware.cmd-key-happy.plist
@@ -5,7 +5,7 @@
        <key>Label</key>
        <string>com.frobware.cmd-key-happy</string>
        <key>Program</key>
-       <string>/usr/local/bin/cmd-key-happy</string>
+       <string>%INSTALL_ROOT/bin/cmd-key-happy</string>

Global exclude for shift-cmd-control-up etc. not working

Hi, thanks for making such a useful utility, it makes my use of Terminal so much more bearable.

I have encountered a slight problem. I am trying to make a global exclude for shift-cmd-control-up, shift-cmd-control-down etc (these are my keyboard shortcuts for moving between spaces) but so far my attempts have failed.

This is my global_exclude line:

global_excludes = Set{ "shift-cmd-tab",
"cmd-tab",
"cmd-`",
"cmd-,",
"shift-cmd-control-up",
"shift-cmd-control-down",
"shift-cmd-control-left",
"shift-cmd-control-right", }

What am I doing wrong? BTW I have caps lock and left control swapped in my keyboard settings. Would that affect this?

Thanks for your help!

Problem on Yosemite

This does not work on Yosemite for me. Followed MakeFile instructions. Using example Lua file. Not sure what Error 3 is in plist part. I tried activating and deactivating use Option as Meta. Any ideas?

$ make output
cc -Ilua-5.2.1/src -MMD -Wpointer-arith -Werror -Wall -Wextra -W -Wunused -Wno-unused-parameter -Wno-unused-function -Wuninitialized -std=c99 -O3 -c -o cmd-key-happy.o cmd-key-happy.m
cc -Ilua-5.2.1/src -O3 -c -o lua-5.2.1.o lua-5.2.1.c
cc -g -o cmd-key-happy cmd-key-happy.o lua-5.2.1.o -framework Foundation -framework AppKit -framework Carbon

$ sudo make install
/usr/bin/install -d /usr/local/bin
/usr/bin/install -m 555 cmd-key-happy /usr/local/bin
/usr/bin/install -m 555 cmd-key-happy-restart.sh /usr/local/bin/cmd-key-happy-restart

$ make install-rcfile
cp example-rcfile.lua ~/.cmd-key-happy.lua

$ make install-plist
mkdir -p /Users/Joel/Library/LaunchAgents
launchctl stop com.frobware.cmd-key-happy
make: [install-plist] Error 3 (ignored)
launchctl unload /Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist
/Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist: No such file or directory
rm -f /Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist
sed -e 's~%INSTALL_ROOT~/usr/local~' com.frobware.cmd-key-happy.plist > /Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist
chmod 644 /Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist
launchctl load -S Aqua /Users/Joel/Library/LaunchAgents/com.frobware.cmd-key-happy.plist
launchctl start com.frobware.cmd-key-happy

I set my permissions as specified.

$ cmd-key-happy-restart

possible issue with JDK 1.8 applications

I use IntelliJ with cmd-key-happy to better emulate emacs keybindings. It's been working fine, but due to some display issues with Apple's JDK, they're moving to a customized version of the 1.8 JDK.

When I try out their early release versions[1], cmd-key-happy ceases to work. I thought this might be because the name had changed, or they were booting up the app differently. But I got the version of IntelliJ that works with cmd-key-happy to do the exact same thing by forcing it to use a pkg installed version of the 1.8 JDK.

So it looks to me like the new JDK 1.8 is the culprit, and it doesn't work well with cmd-key-happy.

Do you have any ideas what's going on?

Thanks for working on this project, nothing else does what it does and I depend on it daily.

[1] https://confluence.jetbrains.com/display/IDEADEV/IDEA+14.1+EAP specifically https://download.jetbrains.com/idea/ideaIU-140.2110.5-custom-jdk-bundled.dmg

cmd-key-happy's Assistive Devices warning gives incorrect instructions to Mavericks users

cmd-key-happy helpfully pops up a notice if access for assistive devices is toggled off - but its location has changed in Mavericks so the notice gives the incorrect location for the preference checkbox as 'in System Preferences via the Universal Access preferences pane'.

It would be less confusing if Mavericks users were informed they must grant cmd-key-happy the permissions to control the computer, via the Security & Privacy preferences panel.

didn't work with M-`

Hi aim-stuff,

Thanks for your work, cmd-key-happy is just what I was seeking for :)

There is a little issue. I use Emacs24 in Terminal.app, I tried to bind keys such as M-``, M-cetc. but none of them work. Of course, nativeM-x, M-<, M->, M-j` etc. work fine. Is there anything wrong?

Thanks very much. I like this repo!

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.