Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
07-15-2021, 10:59 AM
|
#1
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Rep: 
|
Is it possible to get exact command when triggering shortcut?
For example, I want to know what command invokes when I hit Fn + F12 to increase brightness. Can I get this or any other command when I trigger some shortcut (what's happening behind the scenes) somehow?
Distro: Debian 10 (stable) XFCE
|
|
|
07-15-2021, 11:39 AM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,612
|
Not a hope. We haven't got a clue, because you told us nothing except "I want to do this."
Imagine that we don't know your box, distro, version, what the Fn key is or does, (which is the actual case) & Try posting some real information.
|
|
|
07-15-2021, 11:46 AM
|
#3
|
LQ Guru
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,756
|
Quote:
Originally Posted by alexander_linux_user
Distro: Debian 10 (stable) XFCE
|
In XFCE4, try the applications menu -> Settings -> Keyboard -> Application Shortcuts.
If no information is there, then it might be that the keys are being dealt with in the firmware.
|
|
1 members found this post helpful.
|
07-15-2021, 02:33 PM
|
#4
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
Keystroke codes is all documented as to what the codes do. How your system interacts with that on each system I think would be documented but may be intercepted by local OEM firmware. Generally a laptop would have that shortcut that you mentioned. A keyboard takes keys and makes them into a code. At some point the code goes to a device in the computer. That computer can take the code and move it to the area needed. The OS and a program could also be part of this command string. https://pc.net/resources/shortcuts/windows_xp
I don't get the last part of question. You mean by a script?
https://www.arduino.cc/en/Reference/KeyboardModifiers
|
|
|
07-16-2021, 03:17 AM
|
#5
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by Turbocapitalist
In XFCE4, try the applications menu -> Settings -> Keyboard -> Application Shortcuts.
If no information is there, then it might be that the keys are being dealt with in the firmware.
|
There is no information about what command Fn + F12 (XF86XK_MonBrightnessUp) triggers or several other Fn combinations, and that's why I'm here. Perhaps, it will allow me to remap Fn + F12 to something else but that's not what I'm trying to achieve. I have no clue how this combination increases brightness and wasn't able to find the right command to increase brightness from the command line by googling for it. xrandr, for example, can set a certain value but not increase/decrease it by step, and some other suggestions were about some tweaking, in other words, it's not like easily increasing/decreasing volume with amixer or something else. I should point out that I looked into kernel logs as well as other logs but couldn't find any event happening during the time when I pressed on Fn + F12.
|
|
|
07-16-2021, 03:23 AM
|
#6
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by jefro
Keystroke codes is all documented as to what the codes do. How your system interacts with that on each system I think would be documented but may be intercepted by local OEM firmware. Generally a laptop would have that shortcut that you mentioned. A keyboard takes keys and makes them into a code. At some point the code goes to a device in the computer. That computer can take the code and move it to the area needed. The OS and a program could also be part of this command string. https://pc.net/resources/shortcuts/windows_xp
I don't get the last part of question. You mean by a script?
https://www.arduino.cc/en/Reference/KeyboardModifiers
|
I know what the combination does but I'd like to know how it does it. The combination is XF86XK_MonBrightnessUp, and "keysym" is 0x1008ff02, the question is what is happening when I invoke it, and whether this action can be achieved from the command line. At least, I'd like to find out what is happening, so I could move on.
|
|
|
07-16-2021, 03:34 AM
|
#7
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by business_kid
Not a hope. We haven't got a clue, because you told us nothing except "I want to do this."
Imagine that we don't know your box, distro, version, what the Fn key is or does, (which is the actual case) & Try posting some real information.
|
Quote:
For example, I want to know what command invokes when I hit Fn + F12 to increase brightness. Can I get this or any other command when I trigger some shortcut (what's happening behind the scenes) somehow?
Distro: Debian 10 (stable) XFCE
|
As you can see, my distro is Debian 10 (stable) on XFCE, Fn + F12 increases brightness (XF86XK_MonBrightnessUp, 0x1008ff02). My laptop is Dell Inspiron 3582, kernel 5.10, if that's what you're missing. The question is about what kind of process invokes in the background to increase brightness when I hit this combination (or any other combination). In other words, is there some log that contains information like that or some tool that can help retrieve this information?
|
|
|
07-16-2021, 04:49 AM
|
#8
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,337
|
this action (monitor brightness up/down) can be activated from command line too, but actually I don't know how is it implemented in xfce. Probably it is built into a binary (executable) somewhere.
http://ddccontrol.sourceforge.net/
|
|
1 members found this post helpful.
|
07-16-2021, 04:58 AM
|
#9
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,392
|
OP, have a read of this and see if you still think there is a simple CLI command for it. And no, I doubt every command invocation is logged.
Personally I have always used the sysfs route when I found it necessary. Worked most of the time.
Last edited by syg00; 07-16-2021 at 04:59 AM.
Reason: OP, not pan64
|
|
1 members found this post helpful.
|
07-16-2021, 04:59 AM
|
#10
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep: 
|
Quote:
Originally Posted by alexander_linux_user
whether this action can be achieved from the command line.
|
1) You probably can simulate keyboard press via xdotool.
Code:
xdotool key XF86XK_MonBrightnessUp
2) You may try xbacklight, and if that doesn't work then xrandr --brightness. Note however, that the latter doesn't actually change brightness: instead, it simulates the brightness change via gamma values.
Last edited by shruggy; 07-16-2021 at 05:06 AM.
|
|
|
07-16-2021, 06:31 AM
|
#11
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,612
|
Quote:
Originally Posted by alexander_linux_user
In other words, is there some log that contains information like that or some tool that can help retrieve this information?
|
Your computer manual might, if it's not one of those 'how to shine' manuals. Otherwise no, you're on your own against your particular bios version. The Dell guys glaze over when they hear 'Inspiron,' because all their serious customers buy Latitudes.
|
|
1 members found this post helpful.
|
07-16-2021, 07:27 AM
|
#12
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by shruggy
1) You probably can simulate keyboard press via xdotool.
Code:
xdotool key XF86XK_MonBrightnessUp
2) You may try xbacklight, and if that doesn't work then xrandr --brightness. Note however, that the latter doesn't actually change brightness: instead, it simulates the brightness change via gamma values.
|
1) I've tried xdotool, and all it did was exactly like I'd hit this combination by myself, without showing any output on the terminal. I'm moving to Xmonad, and launching this command from the terminal did absolutely nothing because Xmonad doesn't know what to do with it unless you tell it in its config file. If I knew the actual command then I could make it work.
2) xbacklight outputs "No outputs have backlight property" message, and as I was reading about the message, folks suggested writing a script on startup to make it work but I don't want to do it for now. As for xrandr, it doesn't simulates +- behavior, and it also broke my redshift process somehow.
After all, it's not critical. I rarely change my brightness and if I need it then I'll log into XFCE to adjust brightness, and then log into Xmonad and the brightness will be the same.
|
|
|
07-16-2021, 07:28 AM
|
#13
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by business_kid
Your computer manual might, if it's not one of those 'how to shine' manuals. Otherwise no, you're on your own against your particular bios version. The Dell guys glaze over when they hear 'Inspiron,' because all their serious customers buy Latitudes.
|
Thanks for the suggestions 
|
|
|
07-16-2021, 07:29 AM
|
#14
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by syg00
OP, have a read of this and see if you still think there is a simple CLI command for it. And no, I doubt every command invocation is logged.
Personally I have always used the sysfs route when I found it necessary. Worked most of the time.
|
Thank you!
|
|
|
07-16-2021, 07:31 AM
|
#15
|
LQ Newbie
Registered: Apr 2021
Posts: 23
Original Poster
Rep: 
|
Quote:
Originally Posted by pan64
this action (monitor brightness up/down) can be activated from command line too, but actually I don't know how is it implemented in xfce. Probably it is built into a binary (executable) somewhere.
http://ddccontrol.sourceforge.net/
|
Thank you!
|
|
|
All times are GMT -5. The time now is 02:16 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|