Re: Re: Cell bracket <-> Inline
- To: mathgroup@smc.vnet.net
- Subject: [mg10809] Re: [mg10649] Re: Cell bracket <-> Inline
- From: John Fultz <jfultz@wolfram.com>
- Date: Thu, 5 Feb 1998 00:58:54 -0500
- Organization: Wolfram Research, Inc.
- References: <199801270810.DAA01347@smc.vnet.net.>
A few comments about the general issue of adding key events... First, there is another KeyEventTranslations.tr file in the Windows subdirectory (i.e. SystemFiles\FrontEnd\TextResources\Windows). Under Windows, this takes complete precedence over the copy in SystemFiles\FrontEnd\TextResources. Also, any keyboard shortcuts listed in the Windows MenuSetup.tr file (in SystemFiles\FrontEnd\TextResources\Windows) take complete precedence over ones in the KeyEventTranslations.tr file under Windows (I think this is probably true for other platforms, as well, but I'm not for certain). This comes into play for the specific modifier you're trying to add... KeyEvent[Down, Modifiers->{Command}] is already being used by MenuSetup.tr for "Nudge down". So, any attempt to use this particular key event in KeyEventTranslations.tr will fail. Finally, concerning your comment about Mathematica not being fully compatible with Win95 keyboards...Mathematica 3.0 is, in fact, fully compatible with Win95 keyboards. There are a few keys that aren't supported like the special Microsoft keys (support will be added in the next major release), but by and large things should work. The trickiest part by far about adding key combinations to KeyEventTranslations.tr is making sure they don't exist in MenuSetup.tr (or even elsewhere in the KeyEventTranslations). Once you've done that, things should just work. John Fultz jfultz@wolfram.com Front End Group Wolfram Research, Inc. Wouter Meeussen wrote: > > hi Carl, > > I'm puzzled by the Frontend's handling of these key events, and a bit > wary of getting hopelessly lost when medling about in these things. On > my machine, the insert as below doesn't work (tried it with Command and > Control as modifiers). > I have the impression that this part of the software isn't really > compatible with the "Microsoft Win'95 PC" type keyboards. > > I have achieved an andvantage though : if I walk the cursor down (in > bracket selection) over a closed cell, it doesn't open up anymore. > That's good, I wanted that effect! (what the Lord has closeth, no > cursor movement shall openeth ..(;-)) > > Thanx for looking in to this, > wouter. > > . . . > Item[KeyEvent[Up], "MovePreviousLine"], > Item[KeyEvent[Down], "MoveNextLine"], (* added 24/01/98 mail Carl Woll > *) > Item[KeyEvent[Down, Modifiers->{Command}], > FrontEndExecute[{ > > FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],After,CellContents] > }] ], > (* end new key event from cell bracket to in-line selection *) > Item[KeyEvent[Left], "MovePrevious"], > Item[KeyEvent[Right], "MoveNext"], > Item[KeyEvent[Right, Modifiers -> {Option}], "MoveNextWord"], > Item[KeyEvent[Left, Modifiers -> {Option}], "MovePreviousWord"], > . . .