Discussion:
Alt key shortcut change
Patrick O'Keeffe
2014-08-05 21:43:59 UTC
Permalink
Thought it might be easier to ask via mailing list than by filing new
issue...

Pressing 'Alt+I' to access the Insert menu, then 'x' inserts a new TeX
code box. Since this has a top-level shortcut (Ctrl+L) I'd like to see
'x' mapped to 'Insert>Box' submenu instead. [If this can be customized,
I haven't discovered how yet.]

What does the community think? Is this no-go from the start or up for
discussion? Maybe a change to wait until the next major release?

Patrick O'Keeffe
Scott Kostyshak
2014-08-05 22:35:49 UTC
Permalink
Post by Patrick O'Keeffe
Thought it might be easier to ask via mailing list than by filing new
issue...
Pressing 'Alt+I' to access the Insert menu, then 'x' inserts a new TeX
code box. Since this has a top-level shortcut (Ctrl+L) I'd like to see
'x' mapped to 'Insert>Box' submenu instead. [If this can be customized,
I haven't discovered how yet.]
What does the community think? Is this no-go from the start or up for
discussion? Maybe a change to wait until the next major release?
There is a ticket with the same issue here: http://www.lyx.org/trac/ticket/9227

Scott
Patrick O'Keeffe
2014-08-05 23:22:04 UTC
Permalink
I'm not sure this is the same issue: #9227 is about the main menu
superceding non-modal dialogs. I was suggesting changing the binding
within the Insert menu so "Alt+I, x" opens the box submenu instead of
inserting a Tex code box (since Ctrl+L does that).

I found a way to bind the raw command to a particular shortcut (Prefs >
Editing > Shortcuts > Cursor...Functions > box-insert) but inserting via
the menu allows me to choose which style of box.

Patrick
Post by Scott Kostyshak
Post by Patrick O'Keeffe
Thought it might be easier to ask via mailing list than by filing new
issue...
Pressing 'Alt+I' to access the Insert menu, then 'x' inserts a new TeX
code box. Since this has a top-level shortcut (Ctrl+L) I'd like to see
'x' mapped to 'Insert>Box' submenu instead. [If this can be customized,
I haven't discovered how yet.]
What does the community think? Is this no-go from the start or up for
discussion? Maybe a change to wait until the next major release?
There is a ticket with the same issue here: http://www.lyx.org/trac/ticket/9227
Scott
Scott Kostyshak
2014-08-06 07:42:56 UTC
Permalink
Post by Patrick O'Keeffe
I'm not sure this is the same issue: #9227 is about the main menu
superceding non-modal dialogs. I was suggesting changing the binding
within the Insert menu so "Alt+I, x" opens the box submenu instead of
inserting a Tex code box (since Ctrl+L does that).
You're right, I see what you mean now.
Post by Patrick O'Keeffe
I found a way to bind the raw command to a particular shortcut (Prefs >
Editing > Shortcuts > Cursor...Functions > box-insert) but inserting via
the menu allows me to choose which style of box.
Here is a patch, I don't know what others think:

diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 32ed83e..d26456d 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -365,7 +365,7 @@ Menuset
Submenu "Branch|B" "insert_branches"
Submenu "Custom Insets" "insert_custom"
Submenu "File|e" "insert_file"
- Submenu "Box[[Menu]]" "insert_box"
+ Submenu "Box[[Menu]]|x" "insert_box"
OptSubmenu "Insert Regular Expression" "context-edit-regexp"
Separator
Item "Citation...|C" "dialog-show-new-inset citation"
@@ -382,7 +382,7 @@ Menuset
Item "Footnote|F" "footnote-insert"
Item "Marginal Note|M" "marginalnote-insert"
Arguments
- Item "TeX Code|X" "ert-insert"
+ Item "TeX Code" "ert-insert"
Item "Program Listing[[Menu]]" "listing-insert"
Item "Date" "date-insert"
Item "Preview|w" "preview-insert"
--
[If this can be customized, I haven't discovered how yet.]

You can make your own menu file and put it in your user directory. I
think this is discussed in Help > Customization.

Scott
Scott Kostyshak
2014-08-07 04:49:55 UTC
Permalink
I was able to patch `Resources/ui/stdmenus.inc` without having to
recompile Lyx. Thank you for doing the legwork. I'll take a look at the
Customization help file regarding a user-defined menu file.
Glad it works. I think you can just put the menus file in the
corresponding ui file in your user dir. But yes, please consult Help >
Customization for details.

Best,

Scott
Pavel Sanda
2014-08-08 02:20:40 UTC
Permalink
Post by Scott Kostyshak
Post by Patrick O'Keeffe
I found a way to bind the raw command to a particular shortcut (Prefs >
Editing > Shortcuts > Cursor...Functions > box-insert) but inserting via
the menu allows me to choose which style of box.
Legit to me. P
Post by Scott Kostyshak
diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index 32ed83e..d26456d 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -365,7 +365,7 @@ Menuset
Submenu "Branch|B" "insert_branches"
Submenu "Custom Insets" "insert_custom"
Submenu "File|e" "insert_file"
- Submenu "Box[[Menu]]" "insert_box"
+ Submenu "Box[[Menu]]|x" "insert_box"
OptSubmenu "Insert Regular Expression" "context-edit-regexp"
Separator
Item "Citation...|C" "dialog-show-new-inset citation"
@@ -382,7 +382,7 @@ Menuset
Item "Footnote|F" "footnote-insert"
Item "Marginal Note|M" "marginalnote-insert"
Arguments
- Item "TeX Code|X" "ert-insert"
+ Item "TeX Code" "ert-insert"
Item "Program Listing[[Menu]]" "listing-insert"
Item "Date" "date-insert"
Item "Preview|w" "preview-insert"
--
[If this can be customized, I haven't discovered how yet.]
You can make your own menu file and put it in your user directory. I
think this is discussed in Help > Customization.
Scott
Scott Kostyshak
2014-08-22 23:03:42 UTC
Permalink
Post by Pavel Sanda
Legit to me. P
It's in at f63146c0.

Scott

Continue reading on narkive:
Loading...