Custom key bindings at runtime

  • Hi!

    I have been reading this highly interesting article on the Cocoa Text
    System by Jacob Rus (http://hcs.harvard.edu/~jrus/Site/Cocoa%20Text%
    20System.html).

    Now I am wondering how I would go about to set key bindings in code
    rather than by editing one of the DefaultKeyBinding.dict files ?

    How can I load a file of my own - much like xCode loads ~/Library/
    KeyBindings/PBKeyBinding.dict ?

    Pierre
  • Pierre,

    There is no public API to customize the key binding dict on the fly
    right now.
    I'm aware of needs and have a plan to provide the capability in a
    future release.

    I'd like to post a comment concerning a section of Jacob's article.

    The bundle-based input server described in his "Input Managers"
    section is never a supported configuration.  The ADC documentation is
    intentionally avoiding to touch the topic.  Also, the purpose of the
    implementation has never been for extending the text system.
    Implementing an NSInputServer in the bundle is already an abusive use.

    So, please do not assume the bundle loading capability will stay
    intact in future Mac OS X releases.

    Aki

    > Hi!
    >
    > I have been reading this highly interesting article on the Cocoa
    > Text System by Jacob Rus (http://hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html
    > ).
    >
    > Now I am wondering how I would go about to set key bindings in code
    > rather than by editing one of the DefaultKeyBinding.dict files ?
    >
    > How can I load a file of my own - much like xCode loads ~/Library/
    > KeyBindings/PBKeyBinding.dict ?
    >
    > Pierre
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<aki...>
    >
    > This email sent to <aki...>
  • Aki,

    Isn't there at least a way to load a keybinding file specific to my
    application?

    Pierre

    On Mar 16, 2006, at 8:14 PM, Aki Inoue wrote:

    > Pierre,
    >
    > There is no public API to customize the key binding dict on the fly
    > right now.
    > I'm aware of needs and have a plan to provide the capability in a
    > future release.
    >
    > I'd like to post a comment concerning a section of Jacob's article.
    >
    > The bundle-based input server described in his "Input Managers"
    > section is never a supported configuration.  The ADC documentation
    > is intentionally avoiding to touch the topic.  Also, the purpose of
    > the implementation has never been for extending the text system.
    > Implementing an NSInputServer in the bundle is already an abusive use.
    >
    > So, please do not assume the bundle loading capability will stay
    > intact in future Mac OS X releases.
    >
    > Aki
    >
    >> Hi!
    >>
    >> I have been reading this highly interesting article on the Cocoa
    >> Text System by Jacob Rus (http://hcs.harvard.edu/~jrus/Site/Cocoa%
    >> 20Text%20System.html).
    >>
    >> Now I am wondering how I would go about to set key bindings in
    >> code rather than by editing one of the DefaultKeyBinding.dict files ?
    >>
    >> How can I load a file of my own - much like xCode loads ~/Library/
    >> KeyBindings/PBKeyBinding.dict ?
    >>
    >> Pierre
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/<aki...>
    >>
    >> This email sent to <aki...>
    >
  • Unfortunately, no.  Applications that are providing such capabilities
    are overriding a private class.

    Aki

    > Aki,
    >
    > Isn't there at least a way to load a keybinding file specific to my
    > application?
    >
    > Pierre
    >
    >
    > On Mar 16, 2006, at 8:14 PM, Aki Inoue wrote:
    >
    >> Pierre,
    >>
    >> There is no public API to customize the key binding dict on the fly
    >> right now.
    >> I'm aware of needs and have a plan to provide the capability in a
    >> future release.
    >>
    >> I'd like to post a comment concerning a section of Jacob's article.
    >>
    >> The bundle-based input server described in his "Input Managers"
    >> section is never a supported configuration.  The ADC documentation
    >> is intentionally avoiding to touch the topic.  Also, the purpose of
    >> the implementation has never been for extending the text system.
    >> Implementing an NSInputServer in the bundle is already an abusive
    >> use.
    >>
    >> So, please do not assume the bundle loading capability will stay
    >> intact in future Mac OS X releases.
    >>
    >> Aki
    >>
    >>> Hi!
    >>>
    >>> I have been reading this highly interesting article on the Cocoa
    >>> Text System by Jacob Rus (http://hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html
    >>> ).
    >>>
    >>> Now I am wondering how I would go about to set key bindings in
    >>> code rather than by editing one of the DefaultKeyBinding.dict
    >>> files ?
    >>>
    >>> How can I load a file of my own - much like xCode loads ~/Library/
    >>> KeyBindings/PBKeyBinding.dict ?
    >>>
    >>> Pierre
    >>> _______________________________________________
    >>> Do not post admin requests to the list. They will be ignored.
    >>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>> Help/Unsubscribe/Update your Subscription:
    >>> http://lists.apple.com/mailman/options/cocoa-dev/<aki...>
    >>>
    >>> This email sent to <aki...>
    >>
    >
previous month march 2006 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today