Mechanism by which keymando identifies the current application

10 views
Skip to first unread message

Sean Mackesey

unread,
Nov 2, 2014, 11:53:25 PM11/2/14
to keym...@googlegroups.com
I have various copies of the iTerm application bundle that I have modified so that I have dedicated "applications" for running certain console programs. I create this by simply copying the iTerm bundle then changing most of the instances of "iTerm" in the Info.plist to the name of my app. This includes the bundle identifier and executable. This allows me to switch to these applications using applescript:

osascript -e 'activate application "mutt"'

However, I cannot seem to make app-specific bindings for these applications in Keymando. Whenever I trigger one of them, I get this cryptic error in a popup:

    undefinde method `keycode' for nil:NilClass
    17:in `create_key_press_for:'

Is there some other setting I need to change to expose the application to Keymando's context detection? Any information would be useful here.

Jean-Paul S. Boodhoo

unread,
Nov 11, 2014, 11:35:28 AM11/11/14
to keym...@googlegroups.com
Hey Sean,

I just did the following:

cd /Applications
cp -rf iTerm.app my_term.app

vi /Applications/my_term.app/Contents/Info.plist

I just changed the CFBundleName value to: my_term.

Then I could launch both my_term and iterm separately and switch between them accordingly.

JP
> --
> You received this message because you are subscribed to the Google Groups "Keymando" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to keymando+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Sean Mackesey

unread,
Nov 12, 2014, 3:26:22 PM11/12/14
to keym...@googlegroups.com
Hi Jean Paul,

I have been able to launch the applications separately and switch between them, the issue is that my only and except blocks in the Keymandorc do not respect these applications (even with changed bundle identifier). Thus I am wondering how Keymando determines the current context.

Sean

Jean-Paul S. Boodhoo

unread,
Nov 12, 2014, 8:56:44 PM11/12/14
to keym...@googlegroups.com
Hey Sean,

I was able to replicate your bug using the usage scenario you were talking about, here is my config (I copied the iTerm bundle and changed its attributes).

only /my_term/ do
map ";ei", lambda { alert 'Hello from my_term' }
end

only /iTerm/ do
map ";ei", lambda { alert 'Hello from my_term' }
end

Currently you can reuse maps if the applications are totally different. The following works no problem:


only /iTerm/ do
map ";ei", lambda { alert 'Hello from iTerm' }
end

only /Neat/ do
map ";ei", lambda { alert 'Hello from Neat' }
end

This is a bug, we'll patch it!

God Bless You,

JP

On 11/12, Sean Mackesey wrote:
> Hi Jean Paul,
>
> I have been able to launch the applications separately and switch between
> them, the issue is that my *only *and *except* blocks in the Keymandorc do
> > an email to keymando+u...@googlegroups.com <javascript:>.
Reply all
Reply to author
Forward
0 new messages