MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Keyboard shortcuts do not work

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23118] Re: Keyboard shortcuts do not work
  • From: "P.J. Hinton" <paulh at wolfram.com>
  • Date: Wed, 19 Apr 2000 02:30:49 -0400 (EDT)
  • References: <8dbgvo$lfl@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <8dbgvo$lfl at smc.vnet.net>,
  "Felix E. Klee" <felix.klee at inka.de> wrote:

> I removed the lines
>     Item[KeyEvent[Left, Modifiers -> {Control},
>         CellClass -> BoxFormData], "NudgeLeft"],
>     Item[KeyEvent[Right, Modifiers -> {Control},
>         CellClass -> BoxFormData], "NudgeRight"],
> from my personal keyboard configuration file for Mathematica 4
> under LINUX. Then I replaced
>     Item[KeyEvent[Right, Modifiers -> {Option}], "MoveNextWord"],
>     Item[KeyEvent[Left, Modifiers -> {Option}], "MovePreviousWord"],
> with
>     Item[KeyEvent[Right, Modifiers->{Control}], "MoveNextWord"],
>     Item[KeyEvent[Left, Modifiers->{Control}], "MovePreviousWord"],
> However when I press these keys (for example in a text cell) the
> cursor only flickers a little bit and nothing happens. Using the
> option "-pureKeys", running X without a window manager (which might
> intercept these keyboard events) or even removing the global
> keyboard configuration file does not help.
>
> Am I doing something wrong (I successfully created several other key
> combinations in the same way) or is this a bug in Mathematica?

There is one other piece of the puzzle.  You need to remove the keyboard
shortcuts for NudgeLeft and NudgeRight in MenuSetup.tr.  This file may
be found in SystemFiles/FrontEnd/TextResources/X.  As with
KeyEventTranslations.tr, you may make a private copy of this file in
your preferences directory.  The lines that need editing are:

Item["Nudge Left", "NudgeLeft", MenuKey["Left", Modifiers->{Control}]],
Item["Nudge Right", "NudgeRight", MenuKey["Right",Modifiers->{Control}]]

It suffices to the MenuKey[] subexpressions so that they look like this

Item["Nudge Left", "NudgeLeft"],
Item["Nudge Right", "NudgeRight"]

or you can remove them from the menu altogether by removing the Item[]
expressions.

The reason that you need to do this is that keyboard shortcuts defined
in MenuSetup.tr take precedence over those in KeyEventTranslations.tr.

--
P.J. Hinton
Mathematica Programming Group    paulh at wolfram.com
Wolfram Research, Inc.


Sent via Deja.com http://www.deja.com/
Before you buy.


  • Prev by Date: Re: Multiple St.St. and Alg-Diff Eq
  • Next by Date: Re: Needs[] and <<
  • Previous by thread: Keyboard shortcuts do not work
  • Next by thread: Re: Keyboard shortcuts do not work