Keyboard shortcut or command to turn off screen ?

Questions about hardware and drivers
Forum rules
Before you post please read how to get help

LMDE 2 support ends on 1-1-2019
Post Reply
Sydney
Level 2
Level 2
Posts: 80
Joined: Mon Oct 28, 2013 8:31 am

Keyboard shortcut or command to turn off screen ?

Post by Sydney » Sun Aug 05, 2018 11:25 am

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

Re: Keyboard shortcut or command to turn off screen ?

Post by xenopeek » Sun Aug 05, 2018 2:27 pm

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: 80
Joined: Mon Oct 28, 2013 8:31 am

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney » Sun Aug 05, 2018 4:43 pm

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 9
Level 9
Posts: 2748
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 » Sun Aug 05, 2018 7:57 pm

nah!

just install AutoKey from Software Manager and do what you want.

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

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney » Mon Aug 06, 2018 5:22 am

Unfortunately I can't program the Fn key with AutoKey

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

Re: Keyboard shortcut or command to turn off screen ?

Post by xenopeek » Mon Aug 06, 2018 5:41 am

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: 80
Joined: Mon Oct 28, 2013 8:31 am

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney » Mon Aug 06, 2018 11:37 am

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

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

Re: Keyboard shortcut or command to turn off screen ?

Post by Sydney » Tue Aug 21, 2018 7:55 pm

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.

Post Reply

Return to “Hardware Support”