Hmm, I'll try to be more clear.
I've followed Allen's instructions to change key-to-command associations by editing KeyBindings.dict as he explains in several posts and his blog. Most of these are straightforward since I know the command name to use (e.g., movePageUp:, scrollPageDown:). However, I cannot find the command names associated with the Shift+Cmd +J and Cmd+J bindings. Further, Shift+Cmd+J is listed as a keyboard shortcut for a menu item which, if I've understood Allen, complicates matters because the menu system consumes keystrokes before sending them on to the application.
What I'd like to do is switch the meanings of Shift+Cmd+J and Cmd+J. I had hoped that I could accomplish the switch my editing, as I have for other key-to-command associations, the KeyBindings.dict file (either directly or by means of the KeyBindingsEditor application and referenced in one or more posts).
Does this help? If changing the key bindings will not work, does anyone have a suggestion on how I might switch the meanings of these keystroke sequences?
Brendan Dixon brendandixon@mac.com 425.922.8798
On Jan 3, 2007, at 12:22 PM, Charilaos Skiadas wrote:
On Jan 3, 2007, at 3:07 PM, Brendan Dixon wrote:
I was hoping to use key bindings. I suppose I could create a TextMate command...but won't that confuse how TextMate binds/ handles keystrokes?
We still don't know what you are trying to do. Are you trying to bind these two commands to different keys, or are you trying to use those keys for a different command? I'm afraid your original post does not make that clear, at least not to me.
One thing you can try and do is record a macro performing this operation you want and then save the macro. Then open the macro file for editing in textmate or even just look at the macro in the bundle editor. Doing that with the Jump To Selection item gave me the command "centerSelectionInVisibleArea", while doing it for the second one gave "centerCaretInDisplay".
Hope this helps
Brendan Dixon brendandixon@mac.com 425.922.8798
Haris
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate