Hi Thomas
    Thanks for your experiments. It is just for Leo that I want this (I'm 
on Linux actually FWIW).

I am next to certain that I tried all of that before, but it was a while 
ago and I will experiment again.

I definitely removed the accelerator ampersand without joy. I wonder if 
there is a difference between Windows and Linux in this area.

At the moment (don't laugh) I have a top level menu entry called 'Iwndow' 
instead of "Window', as a workaround...

I'll do a few experiments in a perhaps more-recent Leo and report back.

Oh, I think you can add a key-binding entry like "Ctrl-S = None # could be 
'Nothing'" to turn off defaults.

Thanks, Jon N

On Monday, September 27, 2021 at 4:13:33 AM UTC+1 [email protected] wrote:

> I'm not sure if you would like to remap some keys Windows-wide, or just 
> for Leo.  If it's Windows-wide, I use a key remapper called *SharpKeys*.  
> I use it to swap caps lock and left control keys.  It's fairly easy to use, 
> and looks like it would remap any keys you like.  It remaps the keys before 
> any applications get them, so even virtual machines get the remapped keys.
>
> For Leo, with your particular example, I was able to make ALT-W perform 
> the *file-save *command by adding an *@shortcut *node to the *@settings* tree 
> in myLeoSettings.leo.  I also had to remove the ampersand from the "W" in 
> the *Windows* menu, which I did in LeoSettings.leo.  It worked for trying 
> it out, but to do it permanently, it would be better to copy the entire 
> *@menus*  tree to myLeoSettings.leo and make the change there.
>
> I didn't remap CNTRL-s, so presumably it still also worked as *file-save*.  
> I'm not sure how you un-assign those key assignment, or whether a shortcut 
> in myLeoSettings.leo overrides them.
>
> In the *@shortcuts* node, here is the key assignment I added to the body 
> of the node:
>
> file-save = ALT+w
>
>
> On Sunday, September 26, 2021 at 5:27:54 PM UTC-4 jkn wrote:
>
>> On Sunday, September 26, 2021 at 10:19:35 PM UTC+1 [email protected] 
>> wrote:
>>
>>> I think you could take away the ampersand from the menu item; then it 
>>> would be available for something else.  That's to be found in the menu 
>>> settings in LeoSettings.leo.
>>>
>>> IIRC that didn't work (I am used to that kind of thing from Windows/MFC 
>> decades ago).
>>
>> I did look at some PyQt subclassing but didn't get very far with it, and 
>> (also IIRC; it was a couple of years ago at least) there is more stuff that 
>> you might think baked into Qt, or at least was at that time.
>>
>> I would love to be proved wrong...
>>
>>     J^n
>>
>>  
>>
>>> On Sunday, September 26, 2021 at 2:37:14 PM UTC-4 jkn wrote:
>>>
>>>> This might be a good place to re-mention my occasional IWBNI (It Would 
>>>> Be Nice If)...
>>>>
>>>> It Would Be Nice If ... there was a way to change some of the normal 
>>>> Window accelerators so as to be able to use ALT-keys for alternative Leo 
>>>> commands.
>>>>
>>>> My first use case it to have ALT-W perform File-Write (aka File Save, 
>>>> currently CTRL-S). This is for compatibility with my preferred CRiSP/Brief 
>>>> key bindings.
>>>>
>>>> I did a bit of experimenting with this ages ago at the PyQt level; but 
>>>> at the moment I seem to be stuck with renaming the 'Window' top level menu 
>>>> to something else, freeing up the 'W'. Personally it would help me if 
>>>> there 
>>>> was a way to select not having top level menu accelerators at all.
>>>>
>>>> (I appreciate that this is as much a PyQt issue as a Leo one)
>>>>
>>>> J^n
>>>>
>>>>
>>>>
>>>>
>>>> On Saturday, September 25, 2021 at 11:15:38 PM UTC+1 [email protected] 
>>>> wrote:
>>>>
>>>>> Pretty much the same as what I came up with:
>>>>>
>>>>> @settings
>>>>>    @menuat /help after
>>>>>       @menu &Local
>>>>>          @item z-open-freewin
>>>>>          ... etc
>>>>>
>>>>> On Saturday, September 25, 2021 at 6:07:11 PM UTC-4 SegundoBob wrote:
>>>>>
>>>>>> On 9/25/21 2:55 PM, [email protected] wrote: 
>>>>>> > I was able to add a new "Local" menu after Help by using the path 
>>>>>> > //help/,   I do get a message on the console 
>>>>>> createMenusFromConfigList 
>>>>>> > no menu Local - do you know why? 
>>>>>>
>>>>>> Not off the top of my head. Here is the node structure I use without 
>>>>>> errors: 
>>>>>>
>>>>>> @settings 
>>>>>> @menuat help before 
>>>>>> @menu &Bob 
>>>>>> @menu &Zxtra Editing 
>>>>>>
>>>>>> -- 
>>>>>> Segundo Bob 
>>>>>> [email protected] 
>>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2a0ceed3-151e-472f-8473-bab91ec5a24cn%40googlegroups.com.

Reply via email to