NISUS Archives

March 2010

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Tue, 16 Mar 2010 03:21:43 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
- 
On Mar 15, 2010, at 10:42 PM, Žorvaršur Davķšsson wrote:

>> You can set any key combinations by defining them as NSUserKeyEquivalents in com.nisus.NisusWriter.plist. For that, you can edit the file with Property List Editor (a component of Developer Tools) or by a Terminal command. With some limitations, you can use also the Keyboard Shortcuts tab of Keyboard [& Mouse] System Preferences to define them.
> 
> Are there any step by step instructions available for this task?

Begin with GUI
<http://docs.info.apple.com/article.html?path=Mac/10.5/en/8564.html>

You may find it too restrictive. It does not allow you to define the same shortcuts to multiple commands, e.g. "Preferences" followed by an ellipsis and "Preferences" followed by three periods. (Too restricted because I want to use the same shortcut also in French applications and Japanese applications which do not have English interface.) And you cannot remove an existing shortcut -- you can add new shortcuts or change existing shortcuts, that's all.

You are not affected by such limitations if you edit com.nisus.NisusWriter.plist directly. Open it in Property List Editor, add NSUserKeyEquivalents as Dictionary, select NSUserKeyEquivalents, hit Add Child, change the name of the newly created entry to a command name (e.g. 'Export As...', not ':File:Export As...') and define a shortcut in Value field (e.g. @~E for command-option-e). The change takes effect next time you launch NWP.

- @ for command, ~ for option, $ for shift and ^ for control. Don't use lower case letters. As I just wrote, @~*E* means command-option-*e*. Use $@~E for command-option-E (i.e. shift[$]-command[@]-option[~]-e). You don't need caring about absolute or relative order of those modifiers ('@', '~', '$', '^'): '@~' and '~@' work exactly in the same way. To remove an existing shortcut, give it "nil" as its value.

- "nil" works for Cocoa apps only. It is interpreted as "n" by a Carbon app like Finder (of OS X 10.5 and earlier). Then, the command is executed each time yo hit "n".

- Note that many control key based key combinations are already defined as Cocoa keybindings. A more or less complete list is available as
<http://www.hcs.harvard.edu/~jrus/Site/System%20Bindings.html>

- If you define as NSUserKeyEquivalents a key combination already taken by Cocoa keybindings... I don't know which will take effect. I have never tried.

- If you don't have Property List Editor (i.e. if you have not installed Developer/Xcode Tools), I think you can use PrefEdit instead. I have never tried it for that purpose, though.
<http://www.bresink.com/osx/PrefEdit.html> (download PrefEdit 1.2, not 2.2)


The corresponding Terminal command for defining the shortcut for 'Export As...' as '@~E's is

defaults write com.nisus.NisusWriter NSUserKeyEquivalents -dict-add 'Export As...' '@~E'

By a google search, you will find many examples of "defaults" used for defining keyboard shortcuts. Most of them do not have "-dict-add". If you use such a command, all the existing shortcut definitions will be gone.


Kino

ATOM RSS1 RSS2