LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 09-06-2015, 02:44 AM   #1
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Elementary OS Luna
Posts: 83

Rep: Reputation: 4
Map Fn Brightness Keys to Shortcut


Some background:
System76 Machine, made a script work-around for the brightness.
Runs the script brightness.sh up or down to increase, decrease the brightness.

The question:
Right now, I have it mapped to Alt+F8 and Alt+F9 to decrease/increase brightness.
I want to map it to Fn+F8 and Fn+F9, but the Keyboard Shortcuts Window doesn't recognize it when I press those (it just still waits for a key-combo).

EDIT 1: The following was fixed, and isn't an issue anymore:
Quote:
Fn+F8 and Fn+F9 still send the brightness change signal to the OS, so I see a window showing the brightness raised/lowered, but since that didn't work for me (System76 was clueless of the problem, I tried grub, whatever), it's useless and doesn't have any effect.
How do I get Keyboard Shortcuts to recognize Fn+F8 and Fn+F9? Or how do I setup an alternate method of keyboard shortcutting?

Again, don't respond if you are going to argue with my methods of getting brightness to work. Try to stay focused on the question at hand.

Last edited by derekpock; 09-06-2015 at 04:18 PM.
 
Old 09-06-2015, 02:57 AM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,408
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Map Fn Brightness Keys to Shortcut

Have you tried instead of mapping keys to pass the kernel the "acpi_osi=" parameter? Worked here on recent Asus laptop.
 
Old 09-06-2015, 10:37 AM   #3
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Elementary OS Luna
Posts: 83

Original Poster
Rep: Reputation: 4
Sigh...yes...I've tried that. As I stated in the question, I'd ask you to not argue/dispute the method of brightness change.
System76 is very different from Asus.
I've tried modifying Grub many times, none of it has ever worked.
 
Old 09-06-2015, 10:53 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I'm afraid I don't think you can do what you want. On my system (ASUS laptop) those key combinations aren't seen by xev at all -- the other fn+<key> ones are though making me think that what you want to do isn't going to be possible.
The keys work as they ought on my system, by the way, just letting you know for completeness.
 
Old 09-06-2015, 04:16 PM   #5
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Elementary OS Luna
Posts: 83

Original Poster
Rep: Reputation: 4
What if I told you xev does pick up my Fn+F8 and Fn+F9 keys? They pick something up, this is the output xev when pressing Fn then F8 (brightness down) and then Fn then F9 (brightness up).

Quote:
FN+F8
MappingNotify event, serial 37, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 37, synthetic NO, window 0x4400001,
mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 38, synthetic NO, window 0x4400001,
mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 38, synthetic NO, window 0x4400001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 38, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

MappingNotify event, serial 38, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

FN+F9
MappingNotify event, serial 39, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 39, synthetic NO, window 0x4400001,
mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 40, synthetic NO, window 0x4400001,
mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 40, synthetic NO, window 0x4400001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

MappingNotify event, serial 40, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
Any way to map this combo to a script? It might not be through the default keyboard shortcuts, but that's fine.

Also, see my edits to the question. I managed (through Grub, believe it or not) to remove the brightness window that shows up when pressing the brightness up down fn keys.
 
Old 09-06-2015, 04:22 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I'm not convinced that that is picking up the key combination as anything meaningful -- I may well be wrong but I read that as noticing that the screen-brightness window had been created and given focus etc. and perhaps that some system key had been used.
Contrast what you see with a real key press event:
Code:
KeyPress event, serial 39, synthetic NO, window 0x1400001,
    root 0xdd, subw 0x1400002, time 1721533, (19,56), root:(613,371),
    state 0x0, keycode 42 (keysym 0x67, g), same_screen YES,
    XLookupString gives 1 bytes: (67) "g"
    XmbLookupString gives 1 bytes: (67) "g"
    XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x1400001,
    root 0xdd, subw 0x1400002, time 1721644, (19,56), root:(613,371),
    state 0x0, keycode 42 (keysym 0x67, g), same_screen YES,
    XLookupString gives 1 bytes: (67) "g"
    XFilterEvent returns: False
 
Old 09-06-2015, 04:42 PM   #7
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Elementary OS Luna
Posts: 83

Original Poster
Rep: Reputation: 4
True, I did see that it didn't pick any keys up. I'm going to leave this thread open a while to see if anyone else has insights about the problem. I might start-up another thread to try to get the brightness keys to work like they should instead of using a script. Right now I'm stuck using xbacklight, and I've tried a few grub changes, but they didn't help.
 
Old 09-06-2015, 04:50 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Sorry to have put a downer on things. Could you map it to some other combination in the mean time? For example my C and V keys have what looks like a slideshow (no idea really) and a camera button on them which didn't do anything (I now use the S button for opening a terminal in XFCE.
 
Old 09-06-2015, 08:15 PM   #9
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Elementary OS Luna
Posts: 83

Original Poster
Rep: Reputation: 4
Yes, I have the keys currently set to Alt+F8 and Alt+F9, so it's not a humongous desperate issue, I'd just like to have the Fn combo since I use that for everything else.
 
  


Reply

Tags
brightness, function, keyboard, keys, shortcut



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Systemd brightness keys exvor Gentoo 4 06-08-2015 01:27 PM
X201 brightness keys not working gregnorc Linux - Laptop and Netbook 10 05-23-2010 10:30 AM
Brightness control Keys not working ravisagar Fedora 0 07-18-2009 10:53 PM
Change brightness with Fn keys rejeep Linux - Laptop and Netbook 2 04-15-2007 03:56 AM
Fn Keys & Brightness epicadop Linux - Laptop and Netbook 3 11-16-2004 10:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 02:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration