Re: Different bindings for math/non-math?
On 09/03/2010 09:39 PM, Wendell Smith wrote: Hi! I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Alternatively, is there any way to use a shortcut (or lyx function) to switch key bindings? That would not be quite as convenient, but still a good start... There isn't really any facility for this directly. But I think LyX actually provides something fairly close. Most of the math bindings are Alt-M plus something. Most of those bindings do NOT require modifier keys following Alt-M, though of course there are only so many keys available, so some of them do. But most of the common ones don't use modifiers. If you wanted, you could switch this trigger key to something else you don't use much, say, /. You could do this by copying the math.bind file to your local LyX user directory (e.g., ~/.lyx/bind/) and then replacing all the M-m stuff with slash. Richard
Re: Different bindings for math/non-math?
On 2010-09-04, Wendell Smith wrote: I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. There is the command-alternative construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. Günter
Re: Different bindings for math/non-math?
On 09/04/2010 10:37 AM, Guenter Milde wrote: On 2010-09-04, Wendell Smith wrote: I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. I don't think this would be all that hard, if someone wanted to do it. But I'm oversubscribed and don't really use the math bindings all that much. There is the command-alternative construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. I was wondering if an easy way to do this wasn't to introduce a dummy LFUN_IN_MATH that would do nothing but be enabled when we are in math mode. Maybe there could also be LFUN_IN_TABLE and LFUN_IN_TEXT. Then the command-alternatives stuff takes care of this. Richard
Re: Different bindings for math/non-math?
On 09/03/2010 09:39 PM, Wendell Smith wrote: Hi! I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Alternatively, is there any way to use a shortcut (or lyx function) to switch key bindings? That would not be quite as convenient, but still a good start... There isn't really any facility for this directly. But I think LyX actually provides something fairly close. Most of the math bindings are Alt-M plus something. Most of those bindings do NOT require modifier keys following Alt-M, though of course there are only so many keys available, so some of them do. But most of the common ones don't use modifiers. If you wanted, you could switch this trigger key to something else you don't use much, say, /. You could do this by copying the math.bind file to your local LyX user directory (e.g., ~/.lyx/bind/) and then replacing all the M-m stuff with slash. Richard
Re: Different bindings for math/non-math?
On 2010-09-04, Wendell Smith wrote: I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. There is the command-alternative construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. Günter
Re: Different bindings for math/non-math?
On 09/04/2010 10:37 AM, Guenter Milde wrote: On 2010-09-04, Wendell Smith wrote: I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. I don't think this would be all that hard, if someone wanted to do it. But I'm oversubscribed and don't really use the math bindings all that much. There is the command-alternative construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. I was wondering if an easy way to do this wasn't to introduce a dummy LFUN_IN_MATH that would do nothing but be enabled when we are in math mode. Maybe there could also be LFUN_IN_TABLE and LFUN_IN_TEXT. Then the command-alternatives stuff takes care of this. Richard
Re: Different bindings for math/non-math?
On 09/03/2010 09:39 PM, Wendell Smith wrote: Hi! I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Alternatively, is there any way to use a shortcut (or lyx function) to switch key bindings? That would not be quite as convenient, but still a good start... There isn't really any facility for this directly. But I think LyX actually provides something fairly close. Most of the math bindings are Alt-M plus something. Most of those bindings do NOT require modifier keys following Alt-M, though of course there are only so many keys available, so some of them do. But most of the common ones don't use modifiers. If you wanted, you could switch this "trigger" key to something else you don't use much, say, "/". You could do this by copying the math.bind file to your local LyX user directory (e.g., ~/.lyx/bind/) and then replacing all the "M-m" stuff with "slash". Richard
Re: Different bindings for math/non-math?
On 2010-09-04, Wendell Smith wrote: > I have been using LyX for a while now, and very much enjoying it, but I > would really love to be able to set different key bindings for math mode > and non-math mode. My main reason for this is that in math mode, I have > to use the Ctrl, Meta, and Shift keys so much that its starting to hurt > my fingers, and I would like to have keybindings without modifiers > (except maybe Shift for capitals) - so insert x would be 'v x' instead > of just 'x', integral would be 'i', etc. Obviously, in text mode this > would be very irritating, but in math mode, I think I would find it very > convenient. Could that be done? Is there some way to automatically > switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. There is the "command-alternative" construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. Günter
Re: Different bindings for math/non-math?
On 09/04/2010 10:37 AM, Guenter Milde wrote: On 2010-09-04, Wendell Smith wrote: I have been using LyX for a while now, and very much enjoying it, but I would really love to be able to set different key bindings for math mode and non-math mode. My main reason for this is that in math mode, I have to use the Ctrl, Meta, and Shift keys so much that its starting to hurt my fingers, and I would like to have keybindings without modifiers (except maybe Shift for capitals) - so insert x would be 'v x' instead of just 'x', integral would be 'i', etc. Obviously, in text mode this would be very irritating, but in math mode, I think I would find it very convenient. Could that be done? Is there some way to automatically switch keybindings upon entering/leaving math mode? Separate math keybindings are a long standing request (by me) but unfortunately not regarded as very important. I don't think this would be all that hard, if someone wanted to do it. But I'm oversubscribed and don't really use the math bindings all that much. There is the "command-alternative" construct, however, that allows you to bind math-functions to keys that would otherwise be invalid in math mode. I was wondering if an easy way to do this wasn't to introduce a dummy LFUN_IN_MATH that would do nothing but be enabled when we are in math mode. Maybe there could also be LFUN_IN_TABLE and LFUN_IN_TEXT. Then the command-alternatives stuff takes care of this. Richard