Keyboard shortcut or command to turn off screen ?

Archived topics about LMDE 2
Locked
Sydney
Level 2
Level 2
Posts: 96
Joined: Mon Oct 28, 2013 8:31 am

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.

User avatar
xenopeek
Level 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

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
Level 2
Level 2
Posts: 96
Joined: Mon Oct 28, 2013 8:31 am

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
AZgl1500
Level 12
Level 12
Posts: 4033
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 AZgl1500 »

nah!

just install AutoKey from Software Manager and do what you want.
Linux Mint 19.3 Cinnamon

Sydney
Level 2
Level 2
Posts: 96
Joined: Mon Oct 28, 2013 8:31 am

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 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

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
Level 2
Level 2
Posts: 96
Joined: Mon Oct 28, 2013 8:31 am

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney »

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

Sydney
Level 2
Level 2
Posts: 96
Joined: Mon Oct 28, 2013 8:31 am

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.


Last bumped by Sydney on Tue Aug 21, 2018 7:55 pm.

Locked

Return to “LMDE 2 "Betsy" Archive”