5

I installed Ubuntu 19.04 on HP ProBook 450 G6 and noticed my function keys for increasing/decreasing brightness both act as toggling microphone, the rest works fine (and everything works fine on Win 10). I have two questions:

  • Is there a way to reconfigure actions for those two keys?
  • Is this a bug that I should report to Canonical?
ThreeDots
  • 151

1 Answers1

0
  1. open terminal and run xmodmap -pke | grep MonBrightness

example:

pratap@i7:~$ xmodmap -pke | grep MonBrightness
keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp
pratap@i7:~$ 
  1. Copy the lines after = for both BrighnessDown and up

  2. Once the keycodes for fn+f3 and fn+f4 are known

  3. xmodmap -e "keycode xxx = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown"

  4. xmodmap -e "keycode yyy = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp"

once you logout above commands 4 and 5 will not persist..

to make them persist follow this thread https://askubuntu.com/a/1131511/739431

PRATAP
  • 22,460
  • 1
    so after I tried to find the keycodes for the keys, it turns out that all 3 keys are mapped to the same keycode - which is whole another problem... so changing action works, but will affect 3 keys again – ThreeDots Aug 21 '19 at 14:13
  • 1
    that is what it is supposed to be, but showkey shows it all maps to the same keycode... seems like a bug tied up to the notebook model, not sure if there is a way to fix that – ThreeDots Aug 21 '19 at 14:21
  • 1
    yes, in windows it's working... that goes on Canonical side, I will probably fill bug report – ThreeDots Aug 21 '19 at 14:34
  • can you please specify in the answer how to map action with ctrl/alt key? I suppose that's what the NoSymbol is for... I'll then accept the answer, thanks for the help – ThreeDots Aug 21 '19 at 14:46
  • yes, I can do that, I was more wondering about how to do it through xmodmap – ThreeDots Aug 21 '19 at 14:56
  • xmodmap requires keycode for fn+f3 or fn+f4 etc.. in your case the keycode is same? rite.. so its not possible to proceed with xmodmap.. you can assign custom keyboard shortcuts with ctrl+f3 with the command xdotool sleep 0.5 key XF86MonBrightnessDown you need to install xdotool package.. sudo apt install xdotool – PRATAP Aug 21 '19 at 14:59
  • https://askubuntu.com/q/1103370/739431 can you check this thread.. it seems some patch is required from the vendor.. – PRATAP Aug 21 '19 at 15:09