On 7/30/25 6:47 AM, Bernt Lie via lyx-users wrote:

I am trying to create a Keyboard Shortcut for inserting Program Listing.

So I go to Tools/Preferences/Editing/Shortcuts, and find "listing-insert" in the Function column. Then I double-click on this element, and type Alt+I Shift+# ("#" as a reference to comment statements in Python, etc., since many letters are already taken – I need something that I can remember). The result is:

OK.. this seems to work, but now Alt+I doesn’t open up the Insert sub-menu, so creating my own shortcut seems to have de-activated the use of Alt+I…

After some experimentation, it seems like if I do Alt+I twice in a row, i.e., Alt+I Alt+I, that re-activates the use of Alt+I to open the Insert sub-menu. But now my short-cut for listing-insert stops to work…

What is going on? Did I choose an illegal short-cut? Or is there a bug?

When you used Alt-I plus Shift-#, you redefined Alt-I in such a way that LyX then 'waits' for the next component, much as it does with Alt-M (which can be followed by a whole ton of other things). That's unavoidable. If LyX thinks you might type Shift-# next, then it isn't going to do anything after you type Alt-I.'

What about Alt-Shift-#, as a single shortcut?

Riki



--
----------------------------
Richard Kimberly (Riki) Heck
Professor of Philosophy and Professor of Linguistics
Brown University

Pronouns: they/them/their
Website:http://rkheck.frege.org/
-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to