Configure Logitech MX Mechanical Keyboard in Ubuntu - No PrtSc!

Ubuntu Version: 22.04 mLTS

Desktop Environment (if applicable): GNOME

Problem Description:

0

I bought a nice new Logitech MX Mechanical Keyboard. I connect it and my MX Master 3S Mouse via Bluetooth. I could also use the dongle. But this morning, I wanted to do a PrintScreen and found out there is no Key for that! Nor is there the Logi Options+ software for Linux.

Is there a way to enable a Print Screen Key on this otherwise lovely keyboard? Among other things, besides doing screenshots, the PrtSc key is also used in the “Magic SysRq” key sequences. Grrr. Is there some config file I could edit to control this?

In the meantime, my Lenovo Laptop at least still has a PrtSc key.

Relevant System Information:

Lenovo ThinkPad P16 Gen2 laptop
Logitech MX Mechanical Keyboard

Screenshots or Error Messages:

What I’ve Tried:
Searching on the web, not finding much.


Do an internet search for “Logitech MX Mechanical Keyboard screenshot”.

Chances are there are several results.
Surely one of the many pages contain at least one result that works for you.

I have Logitech keyboard but the silent version to avoid annoying others with clickclack. And Logitech mouse.
There are some workarounds I can suggest.
Your might map some hot key to emulate PrtSc - try AutoKey or other mapping tool (I know of several).
Or just use Flameshot to print full or part screen.

One related article.

The trouble with that search is that it’s not Linux-specific. There was one video shared that suggested tapping the F7 key which indeed brings up a print-screen dialog on Windows, evidently. But on Ubuntu, it is a no-op.

Hadn’t heard of AutoKey before. I could look into that, but before I dive into another rabbit-hole, I have a question. A cursory glance at AutoKey reveals that its main purpose is to generate oft-repeated text from a single keystroke. That’s not quite my use case. I want to generate a system function (PrtSc/SysRq) from a key stroke. I don’t know how to specify that or if it would even work.

The other option you suggest - keyboard settings, also doesn’t seem, at first glance to be geared for this use.

See link I added as after thought.

Also there is a favourite (old) tool I use. Actiona. This allows key mapping.

Then there is xdotool. Run xdotool --help.

Thanks, the Ubuntu setting works great as far as taking screenshots is concerned. That’s 95% of my use case. The other 5% is the SysRq function (magic SysRq key). On my previous, underpowered machine, I was frequently running out of memory and locking the system. Then the Alt-Prtsc/REISUB combination was a life saver. I don’t expect this as much on my new machine with much more RAM, but it would still be nice to have a SysRq key.

See also here.

Actually, no. It does work for taking screenshots, but it also disables the perfectly functional PrtSc button on my Lenovo laptop. If it comes down to it, I can always use that for Screenshots.

However, this

may get me what I’m after. Thanks.

I wasn’t the one who flagged it. I looked at a few of the links that came up and they weren’t immediately helpful, and then others suggested other paths that looked more fruitful.

The solution on reddit did not work for me, possibly because I am feeding both MX keyboard and mouse events through the dongle.

Oh well, I can always do PrtSc and SysRq through the laptop keys.

So sending the ferrets down the rabbit-holes did not work out.
I must admit that for such events in my Dell tower I keep my old Dell keyboard plugged in, in parallel with Logitech MX.

Example: I use rEFInd for dual boot and if I wish to navigate the UI, Bluetooth does not kick in at that point. So I revert to my old keyboard.

Re: Post 10 above. If WyathWhyteEagle has experienced being flagged by some unknown reader - re: “
and comments wiped (by discourse police) without opportunity to explain context, then I share concerns about this general practice across forums. Perhaps moderators should act on more than one flag out of the blue?

I thought we worked under the rule “innocent until proven guilty”. Or context explained.

Example: I contributed an idea to Sublime Text forum. My post was flagged and deleted by moderator. I had to re-subscribe - older and wiser.

Since my mind works in visual metaphors I had proposed the Ubuntu launcher Albert in a Sublime Text workflow and went on to suggest that this elegant Albert query field reminds me of the old 1951 sci-fi film, where Robot Gort has an “all seeing eye”. I was accused by Sublime Text moderator of using AI to conjure up ideas (not so) and I was flagged and banned to the tundra.

http://www.robothalloffame.org/inductees/06inductees/gort.html

Get the context?

Klaatu barada nikto

On other, occassions when Ubuntu technical jargon runs very deep, I refer to the old Danny Kaye sketch.

So WyathWhiteEagle - dust yourself down and join the club of flagged and chastened contributors.

Note that a flag has no influence at all on the comments, if anyone flags a post it gets temporary hidden and put into a review queue for the moderators, actually deleting it is then up to the moderator, if the moderator doesn’t take any action in time it will unhide itself after a while… (I’m not a moderator in here (and have no clue what was written in the deleted post), but handle other discourse sites and the above is the default setting)

The additional posts you see deleted in this conversation were not deleted in this process, they were deleted by WyathWhiteEagle, not by a moderator or by the system

Does your keyboard have “Insert” and “Delete”? PrtScr and SysReq are often mapped to those keys with the “Fn” key. Perhaps using Alt and Alt+Shift with them could lead to useful mapping.
Your keyboard is unknown to me, sorry.

Thanks, but no, this mapping doesn’t exist on this kb

@stevecoh1

I have also a Logitech MX Keyboard and as you say there are no Sysreq or printscreen keys, they have been sequesterd by the host selection keys.

I have tried to use Solaar to map the keys but Solaar does not natively support Linux, only Mac, Andoid and Windows, and I can’t get it to do what I want. There are other suggestions on this thread but it seems you have tried them all with no results.
If you do manage to get it going, please post here to let us all know. I will keep trying different solutions, if I crack it I will report back here.
Cheers Tony.

Just had a flash idea … there is an app Input Remapper

I wonder if this might be another approach … mapping keys.

Solaar looks like it may have the answer.
I have taken a screenshot of the interface for adding rules. See below:

Where the highlighted blue line is, right mouse click to bring down further drop down menus. The “condition” and “action” menus look very promising to enable particular keys and different functions.

1 Like

Thanks, but sorry, I have gotten rid of solaar. I was using it to support both a Logitech MX Master 3s Mouse and Logitech MX Mechanical Keyboard, which the interface let me do. While it was running, inability to resume from suspended mode was common requiring system restart.

Please see this other Discourse thread for the gory details.

This whole issue was occupying too many brain cells. I have the functionality I need on my laptop keyboard (print screen and SysRq) and I’ve decided to leave it at that. I am using Bluetooth for connectivity to these peripherals.