Discussion:
Keyboard shortcuts (KDE, NEdit) confusion
Matthijs van Aalten
2009-03-31 08:16:03 UTC
Permalink
Hi,

It's been a long time since I last used this mailing list for support - but I'm not able to solve the following problem myself:

Using alt+Left and alt+Right used to do next_document() and previous_document() - doesn't work anymore.

We've recently been migrated from one system to another system:
The PCs (running Windows XP) haven't changed, but we've moved from using Reflection-X to Exceed-on-demand. At the same time we've migrated to new Linux login-servers and a lot of configuration stuff has been reset. So a lot of changes making it difficult to trace the cause of the problem.

Linux system: Red Hat something, using KDE as desktop environment.

What I found out during my own investigation:

- NEdit *does* receive the keyboard codes. When I define a macro (Preferences->Default Settings->Customize Menus->Macro Menu), I can set the accelerator keyboard shortcut to Alt+Left. But the shortcut doesn't do anything after defining it.

- I tried to define it manually by adding:
NEdit*text.Translations: #override\n\
Alt<KeyPress>Right: next_document()\n\ ... to the NEdit application defaults file. No luck.

- The khotkeysrc config file also had a few Alt+Right shortcuts. Removing them (then restarting KDE) didn't have any effect.

- I even copied my old $HOME/.kde/share/config to my new Linux home directory - no effect.

So it seems something is stealing the Alt+Left/Right keypresses away from NEdit (although they *do* arrive when defining a macro). How can I find the cause and repair this?

Thanks,
Matthijs van Aalten
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Offer Kaye
2009-03-31 09:04:11 UTC
Permalink
Post by Matthijs van Aalten
Hi,
Using alt+Left and alt+Right used to do next_document() and previous_document() - doesn't work anymore.
It must have been something custom you had, since the default for
these are Ctrl+PageUp and Ctrl+PageDown. Reference:
http://www.nedit.org/help/keyboard.php#Keyboard_Shortcuts
" Alt+Home Switch to the previously active document.

Ctrl+PageUp Switch to the previous document.

Ctrl+PageDown Switch to the next document.
"
Post by Matthijs van Aalten
- NEdit *does* receive the keyboard codes. When I define a macro (Preferences->Default Settings->Customize
Menus->Macro Menu), I can set the accelerator keyboard shortcut to Alt+Left. But the shortcut doesn't do anything
after defining it.
According to Nedit documentation, you cannot use this method to set
existing bindings. Reference:
http://www.nedit.org/help/binding.php#Key_Binding
"However, if you want to change existing bindings ... you will need to
do so via X resources."
Post by Matthijs van Aalten
NEdit*text.Translations: #override\n\
    Alt<KeyPress>Right: next_document()\n\ ... to the NEdit application defaults file. No luck.
I'm not sure this is correct - where did you find an Action Routine
called "next_document()"? I don't see it listed in the NEdit
documentation (http://www.nedit.org/help/actions.php#Action_Routines).
Perhaps what you want is 'focus_pane("next")'?

Also, did you run 'xrdb -l ~/.Xdefaults" from the shell after
modifying your Xdefaults file? Changes to x-resources in the Xdefaults
file only actually start working when you re-read the file with the
xrdb utility.

Hope this helps,
--
Offer Kaye
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Matthijs van Aalten
2009-03-31 14:22:56 UTC
Permalink
Post by Offer Kaye
Post by Matthijs van Aalten
Using alt+Left and alt+Right used to do next_document() and
previous_document() - doesn't work anymore.
It must have been something custom you had, since the default for
http://www.nedit.org/help/keyboard.php#Keyboard_Shortcuts
" Alt+Home Switch to the previously active document.
Ctrl+PageUp Switch to the previous document.
Ctrl+PageDown Switch to the next document.
You're right - previously it must have been customized somewhere
outside my own configuration. Ctrl+PageUp/Down works - but I prefer
to have it back the way I had it...
Post by Offer Kaye
According to Nedit documentation, you cannot use this method to set
http://www.nedit.org/help/binding.php#Key_Binding
"However, if you want to change existing bindings ... you will need
to do so via X resources."
Mmmm... so I guess that there is already an existing key binding
somewhere that does nothing. How do I find the cause for this?

I've tried to get a list using 'xrdb -all -query', but don't find any
keymapping that might interfere.

I don't know what kind of systems can interfere. Xresources, perhaps a
KDE configuration, maybe something Exceed-on-demand - and what else?
Post by Offer Kaye
Post by Matthijs van Aalten
NEdit*text.Translations: #override\n\
Alt<KeyPress>Right: next_document()\n\ ...
to the NEdit application defaults file. No luck.
I'm not sure this is correct - where did you find an Action Routine
called "next_document()"? I don't see it listed in the NEdit
documentation (http://www.nedit.org/help/actions.php#Action_Routines).
Perhaps what you want is 'focus_pane("next")'?
It's not really well documented, but check the last lines here:
http://www.nedit.org/help/interface.php#Tabbed_Editing
... which names the action routine next_document(). If I define an menu
item in the action menu which only does this action routine and activate
it by selecting the menu item with the mouse, it works - so although
not well documented, it _does_ work.

I also manage to bind it to alt-F11 (from within the NEdit customize
macro menu) and it works. So the action routine isn't the problem - it
really is the key binding that doesn't work.

(if I remember correctly, the advantage of next_document is that it
cycles through the tabs, also from the last back to the first)
Post by Offer Kaye
Also, did you run 'xrdb -l ~/.Xdefaults" from the shell after
modifying your Xdefaults file? Changes to x-resources in the Xdefaults
file only actually start working when you re-read the file with the
xrdb utility.
I'm editing the NEdit x-resource file itself, not Xdefaults - so just
quiting and restarting NEdit is enough to re-read the new settings.

Best regards,
Matthijs van Aalten
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Offer Kaye
2009-03-31 16:18:42 UTC
Permalink
Post by Matthijs van Aalten
NEdit*text.Translations: #override\n\
    Alt<KeyPress>Right: next_document()\n\ ...
Could the problem be the "\" at the end of the second line?
--
Offer Kaye
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Matthijs van Aalten
2009-04-01 14:30:27 UTC
Permalink
Post by Offer Kaye
Post by Matthijs van Aalten
NEdit*text.Translations: #override\n\
    Alt<KeyPress>Right: next_document()\n\ ...
Could the problem be the "\" at the end of the second line?
Nope... there are more keybindings following this line, so the
"\" at the end is there for a good reason.

Besides, if I change the Alt<KeyPress>Right to something else
(Alt<KeyPress>F11 for instance), it works. So there definitely is
something interfering the Alt-Right&Left keys. I suspect this
might be KDE, but can't find the root cause...
--
Matthijs van Aalten
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Joerg Fischer
2009-04-01 16:54:56 UTC
Permalink
Post by Matthijs van Aalten
Besides, if I change the Alt<KeyPress>Right to something else
(Alt<KeyPress>F11 for instance), it works. So there definitely is
something interfering the Alt-Right&Left keys. I suspect this
might be KDE, but can't find the root cause...
Sure, the window manager can grab keys away. But then they shouldn't
arrive at the client, that is, at NEdit. So, I don't understand this
Post by Matthijs van Aalten
- NEdit *does* receive the keyboard codes. When I define a macro
(Preferences->Default Settings->Customize Menus->Macro Menu), I can
set the accelerator keyboard shortcut to Alt+Left. But the shortcut
doesn't do anything after defining it.
Sorry, can't help there. You needn't try to set the keys via
.Xresources because the accelerator keys defined in the menu take
precedence anyways. If you can define them there, the menu should be
called thereafter.

--Jörg
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Ravenhall, Stewart
2009-04-01 17:01:37 UTC
Permalink
Post by Matthijs van Aalten
So there definitely is
something interfering the Alt-Right&Left keys.
I suspect this might be KDE, but can't find the
root cause...
Have you checked your Exceed Xconfig settings? You can map the left and
right alt-keys to Windows or X separately.

Best wishes,
Stew
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
w west
2009-04-01 20:59:49 UTC
Permalink
Hi Matthijs,
I had a similar problem lately with the Alt + Down key,
which I use in Nedit to select/find a word. With Reflection-X that
worked, moving to Exceed OnDemand, it didn't work anymore. I tried a
simple Motif example program, which had the same problem. In the end Hummingbird support did put me on the right track.
You need to alter the Exceed us.kbf file. I moved key defs 147 till 153 (Home, Up, Prior, Left, Right, etc) in front of the numeric keys (I put them in between key defs 44 and 45). I don't really understand the kbf file and the relation with Nedit, but it worked for me.

Kind regards, Wim

sybhs
@
yahoo.com



----- Original Message ----
From: Matthijs van Aalten <matthijs.van.aalten-***@public.gmane.org>
To: "discuss-***@public.gmane.org" <discuss-***@public.gmane.org>
Sent: Tuesday, March 31, 2009 10:16:03 AM
Subject: Keyboard shortcuts (KDE, NEdit) confusion

Hi,

It's been a long time since I last used this mailing list for support - but I'm not able to solve the following problem myself:

Using alt+Left and alt+Right used to do next_document() and previous_document() - doesn't work anymore.

We've recently been migrated from one system to another system:
The PCs (running Windows XP) haven't changed, but we've moved from using Reflection-X to Exceed-on-demand. At the same time we've migrated to new Linux login-servers and a lot of configuration stuff has been reset. So a lot of changes making it difficult to trace the cause of the problem.

Linux system: Red Hat something, using KDE as desktop environment.

What I found out during my own investigation:

- NEdit *does* receive the keyboard codes. When I define a macro (Preferences->Default Settings->Customize Menus->Macro Menu), I can set the accelerator keyboard shortcut to Alt+Left. But the shortcut doesn't do anything after defining it.

- I tried to define it manually by adding:
NEdit*text.Translations: #override\n\
Alt<KeyPress>Right: next_document()\n\ ... to the NEdit application defaults file. No luck.

- The khotkeysrc config file also had a few Alt+Right shortcuts. Removing them (then restarting KDE) didn't have any effect.

- I even copied my old $HOME/.kde/share/config to my new Linux home directory - no effect.

So it seems something is stealing the Alt+Left/Right keypresses away from NEdit (although they *do* arrive when defining a macro). How can I find the cause and repair this?

Thanks,
Matthijs van Aalten
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Loading...