RE: Adding a key binding for a Style
- To: mathgroup at smc.vnet.net
- Subject: [mg70935] RE: [mg70911] Adding a key binding for a Style
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 2 Nov 2006 06:47:19 -0500 (EST)
David, The style sheet assigns keys implicitly in the order that the cell styles appear in the style notebook. Alt-1 to Alt-9. After that it does not assign a key. You don't actually need a key for Input as that is the default style. To insert a key for a new cell style you will have to put the cell style in the style notebook in a correct place so that it will catch a key number. You could put it just before the standard Input cell and usurp Alt-9. But be careful about putting it early in the notebook and bumping all of the standard cell style keys. I consider that very bad form! I always expect Alt-7 to generate a Text cell. Users will not want to learn a whole new key structure for your notebooks, and then another one for someone else's notebook. If you wanted to usurp the Title key, say, you could put your new style first, but then move the Title definition to a later part of the style sheet notebook, keeping all the other keys the same. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: David Bakin [mailto:davidbak at gmail.com] To: mathgroup at smc.vnet.net Certain of the styles (section, subsection, text, etc.) have key bindings (under windows: Alt-1, Alt-2, etc.). I'd like to add a keybinding for a different specific style (input). I've learned about KeyEventTranslations.tr and MenuSetup.tr from the mathgroup archives, however I have a problem: The key bindings for the styles aren't in there! Instead in the style menu there's an item "Start Cell Style Names" and apparently this part of the menu is filled in programatically. I also looked inside of the default stylesheet (under FrontEnd/StyleSheets/Default.nb) but didn't see anything that looked like a key binding. So: is this possible? and if so how? Thanks! -- Dave (Thanks to everyone who answered my previous question - which was answered (properly) by referring me to the documentation on Hold, HoldFirst, etc. I didn't thank you then because I was embarrassed that I missed understanding such an obvious point.)