Keyboard shortcut or command to turn off screen ?

Archived topics about LMDE 1 and LMDE 2
Locked
Sydney

Keyboard shortcut or command to turn off screen ?

Post by Sydney »

I hope this is the right place to post ?

LMDE2 Betsy 64-bit on a Thinkpad: is there a keyboard shortcut or a command to turn off the screen ?

Backstory: (old) thinkpads came with various keyboard commands, one of them being Fn+F3 to turn off the screen. Fn+F4 suspended the computer.
Fn+F4 still works in LMDE2, but Fn+F3 only yields power (battery) Information.

Is there any way to re-program Fn+F3 to turn off the screen ? Or is there a command that I could stick in a launcher ?

Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Keyboard shortcut or command to turn off screen ?

Post by xenopeek »

Possibly this command will do what you need:
xset dpms force off

You can bind it to a keyboard shortcut in the keyboard settings.
Image
Sydney

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney »

Thanks so much ! The command does exactly what I was after.

I am still struggling with setting up the shortcut though.

When I add my shortcut as a custom shortcut via keyboard shortcuts (name: "Screen off", command: "xset dpms force off"), click "apply" and then click on the new shortcut and hit Fn+F3, the "Shortcut" name changes from "Disabled" to "Battery", i.e. the shortcut's original function.
Is there any way to override that ?
If all else fails I'll set up a launcher, it would just be nice to be able to use the shortcut.
Thanks again.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11145
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Keyboard shortcut or command to turn off screen ?

Post by AZgl1800 »

nah!

just install AutoKey from Software Manager and do what you want.
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
Sydney

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney »

Unfortunately I can't program the Fn key with AutoKey
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Keyboard shortcut or command to turn off screen ?

Post by xenopeek »

From what I've read the keyboard may not generate a keyboard event for that key combination but some other hardware event, like an ACPI event. Don't know if you can reassign the key combination. Easiest to use a different keyboard shortcut, one that doesn't have a set function on the keyboard.
Image
Sydney

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney »

O.k., thanks very much for the info. Will do.
Sydney

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney »

When I started using the command
xset dpms force off
it became apparent that it does in fact turn the screen off, but only for about 20 seconds or so.
Is there any way to stop the screen from turning itself on again ?
Thank you.
Locked

Return to “LMDE Archive”