2

This is the same problem asked before, but the “solution” was along the lines of “the problem went away after an update and reboot” which was purely serendipitous, as I tried installing the same distro version with updates and nothing changed. The problem was left unaddressed specifically.

After two weeks now of surfing for answers, I think I've correctly narrowed the problem but I'm too much of a noob to figure out how to code the solution.

Can anyone help please?

  1. I think the problem originates in the boot (BIOS), but I don't know how to change it (or really want to risk it from what I've read). Therefore, the solution could be ...

  2. A way to force a release event for the key presses. This is where I get stuck. As 18.04 has replaced "keymap" files with "hwdb" and "rules" files in the /etc/udev directory, I've tried all sorts of permutations of adding lines in newly created file 70-keyboard-force-release.hwdb and the same as a .rules file but all to no avail.

SHOWKEY reveals the scan and key codes, I just don't know what to do with them. I've tried using other matched pairs as templates, but I can't figure it out.

Can someone help me figure out the right code?

DESCRIPTION: I just installed LUBUNTU 18.04 LTS x86_64 on a brand-new Dell Inspiron 11-3162 but the "Home | End | PgUp | PgDn" functionality does not work.

On this particular keyboard you have to hit Fn+LeftArrow for Home, or Fn+RightArrow for End, Fn+UpArrow for PgUp and Fn+DownArrow for PgDn. The crazy part is the first time I use one of these functions it works. But if I try and go "home" or "end" a second time, nothing happens. I have to reboot to be able to do it again for the first time, and then nothing the second time.

Also, the Function key does work with other features ... for example the Fn+F2 and F3 de/increase the volume; Fn+F12 brightens the screen ; Fn+F1 mutes the sound.

MORE INFO: I forgot to mention my distro: Lubuntu 18.04 on an Inspiron 11-3162 with keyboard.

Keyboard description printout: Keyboard description printout

THE PROBLEM: This is a post of this problem with the “non-solution” I described. Very good description: Dell Inspiron 11-3162 Home | End | PgUp | PgDn keys not working

IS IT BIOS? Another user with similar problem but makes me think it’s BIOS (due to comments): Fn key sticks down

BIOS OR GRUB? Another user with similar problem but makes me think it’s BIOS or GRUB due to comments; I tried the solutions here to no avail: Getting function keys working on Samsung RV510 notebook

FAILED SOLUTION: This is what I consider the closest attempt but I cannot get it to work. https://github.com/arduino/dfu-utils-cross/blob/master/eudev-3.1.5/hwdb/60-keyboard.hwdb

There is something similar to it at: https://www.dell.com/community/Linux-General/Dell-Inspiron-3179-keyboard-not-sends-KEY-RELEASE-events-key-up/td-p/5114299

I tried:

IN etc/udev/hwdb:

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*Inspiron 11-3162:pvr*
KEYBOARD_KEY_c9=!pageup
KEYBOARD_KEY_d1=!pagedown
KEYBOARD_KEY_c7=!home
KEYBOARD_KEY_cf=!end

evdev:atkbd:dmi:bvn:bvr:bd:svnDell:pn* KEYBOARD_KEY_0xe0 0x49=!pageup KEYBOARD_KEY_0xe0 0x51=!pagedown KEYBOARD_KEY_0xe0 0x47=!home KEYBOARD_KEY_0xe0 0x4f=!end

evdev:atkbd:dmi:bvn:bvr:bd:svnDell:pn* KEYBOARD_KEY_0x49=!pageup KEYBOARD_KEY_0x51=!pagedown KEYBOARD_KEY_0x47=!home KEYBOARD_KEY_0x4f=!end

evdev:atkbd:dmi:bvn:bvr:bd:svnDell:pn* KEYBOARD_KEY_0x49=!104 KEYBOARD_KEY_0x51=!109 KEYBOARD_KEY_0x47=!102 KEYBOARD_KEY_0x4f=!107

IN /etc/udev/rules.d:

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:prn*
KEYBOARD_KEY_c9=!104
KEYBOARD_KEY_d1=!109
KEYBOARD_KEY_c7=!102
KEYBOARD_KEY_cf=!107

Almost everything else, I’ve put below in case any of the info helps you. As a Linux-infant, I found it helpful, but maybe I’m just chasing my tail in circles. I’m thinking I need to take a course somewhere but that’s another topic. Anyway, here’s more stuff I tried:

FAILED SOLUTION: I tried the solution here but I’m so illiterate, I’m not sure if I even translated the “solution” correctly. https://github.com/lu-zero/udev/blob/master/src/keymap/95-keyboard-force-release.rules

I tried: Edit /usr/lib/udev/rules.d/70-keymap.rules, add following line to the other Samsung specific lines

ACTION=="remove", GOTO="force_release_end"
SUBSYSTEM!="serio", GOTO="force_release_end"
KERNEL!="serio*", GOTO="force_release_end"
DRIVER!="atkbd", GOTO="force_release_end"

ENV{DMI_VENDOR}=="[iI][nN][sS][pP][iI][rR][oO][nN]", ATTR{[dmi/id]product_name}=="11-3162", RUN+="keyboard-force-release.sh $devpath Inspiron 11-3162"

LABEL="force_release_end"

FAILED SOLUTION: This was another similar article that I tried to use for another solution to no avail. http://natjohan.info/linux-on-samsung-np900x3c.html

FAILED SOLUTION: Here’s another solution I tried called xdotool. https://unix.stackexchange.com/questions/60007/how-to-force-release-of-a-keyboard-modifiers/64716 I couldn’t get anything to work after trying:

sudo xdotool keyup
sudo xdotool keyup --clearmodifiers
sudo xdotool key --clearmodifiers
sudo xdotool --clearmodifiers

FAILED SOLUTION: Trying to do something with keymap was a waste I learned because it has been replaced with /etc/udev/hwdb and /etc/udev/rules, but I tried to use some info in this article to come up with a solution to no avail: https://ask.fedoraproject.org/en/question/37598/how-to-create-custom-keymaps-now-that-libudevkeymap-is-gone/

BACKGROUND: This was one of the most helpful articles for me but I don’t know enough to come up with the right code still. BACKGROUND: Since my Linux experience totals all of about 3 weeks after being a Windows slave since DOS-days, I found the following articles that are somewhat specific to the problem helpful. BACKGROUND: I used something called showkey to show key codes that showed the presses without the release:

showkey output: showkey output

You can see how the first press of the key presses but since there is no release event, it goes on, until I hit any other key. The order of the key press attempts is fn+left arrow (home, code 102), fn+right arrow (end, code 107), fn+up arrow (pgup, code 104), and fn+down arrow (pgdn, code 109). The bottom of the page output is for pressing only the arrows to show that they have different codes and that they have release events right after the press event. In the same order above (left, right, up, down), the codes are 105,106,103,108 (which is the same ass what evtest below shows)

BACKGROUND: I used something called evtest to show key codes and events: The order of the key presses are fn+left arrow (home, code 105), fn+right arrow (end, code 106), fn+up arrow (pgup, code 103), and fn+down arrow (pgdn, code 108),

Evtest output: Evtest output

MORE INFO: After watching the ytube video: "3.3: Events (mousePressed, keyPressed) - Processing Tutorial" by The Coding Train, perhaps it's important for me to specify that I really need this fn+arrow functionality for using home, end, pgup, pgdn in Excel and Word. Though it would be nice to work in things like my file manager, synaptics, the internet, and everywhere else, my priority is in Excel and Word.

INFO UPDATE: I forgot to mention another reason I think this might be a BIOS problem is that my Inspiron 11-3162 has a certified Ubuntu release 14.04, but the BIOS for that is 1.0and mine is 2.2. I tried installing that distro, but to no avail. I also read somewhere that the BIOS contains instructions for hardware including the keyboard. The IT guy where I work (Emory Univ) told me that it's possible that the BIOS either doesn't send a key release for the fn + arrows because Windows doesn't need it. He also told me it's possible that BIOS doesn't load properly if it detects a non-Windows OS (thanks Microsoft for intentionally making it harder to break the slave chains of Windows)

INFO UPDATE: Sorry for these frequent updates, but I do them in the spirit of hoping that they will help someone out there in the Linux ommunity ... esp as I am still trying to solve this problem myself. Anyway, here is a link to someone who is much more advanced than I (not hard to be) who has the same problem and who tried many of the things that I have - also to no avail.

MarianD
  • 1,028
  • 1
    Could you please provide links to the other question you mentioned and to some resources that made you think it is a bios problem? Also, please check if (and which) key press/release events are registered using xev and evtest. – danzel May 21 '18 at 07:13

2 Answers2

1

Faced exactly the same problem on Lubuntu 20.04. And I'm writing this to make known what worked for me (thanks to https://www.dell.com/community/Linux-General/Dell-Inspiron-3179-keyboard-not-sends-KEY-RELEASE-events-key-up/m-p/5114301/highlight/true#M15475)

Firstly, lot of useful info could be obtained from the documentation in the /lib/udev/hwdb.d/60-keyboard.hwdb file. It's here where I got to know about "AT Keyboard" and a "force-release" list of scan codes maintained by the AT Keyboard (to make the driver synthesize a release event, when the same is not to be expected from the hardware).

The actual changes made:

  1. Created a file /etc/udev/hwdb.d/70-keyboard.hwdb, with the below content in it:
### for Dell Inspiron 11-3168

evdev:atkbd:dmi:bvn:bvr:bd:svnDell:pnInspiron3168:pvr KEYBOARD_KEY_c7=!home # Fn+Left Home KEYBOARD_KEY_cf=!end # Fn+Right End KEYBOARD_KEY_c9=!pageup # Fn+Up Page Up KEYBOARD_KEY_d1=!pagedown # Fn+Down Page Down

  1. Ran the below commands to activate the changes:
# systemd-hwdb update
# udevadm trigger --verbose /dev/input/event4
  1. Reboot (although not sure if this is actually required)

Hope this helps!

0

I think there are 2 ways of doing it:

  1. Using command line : a) Get the output of your keymap xkbcomp -xkb $DISPLAY xkbmap and locate the keys you intend to interchange b) Then interchange with code xcape -e 'Caps_Lock=Escape' (Caps_Lock and Escape is given as example)

  2. Using GUI application: a) Install the app from the repo sudo apt install xbindkeys xbindkeys-config b) Launch xbindkeys-config GUI and alter accordingly.

Hope this helps