Key bindings for the Samsung Chromebook


I am trying to make a Samsung Chromebook to support Linux functionality in 
a manner to which I am accustomed. The problem is missing keys. A possibly 
noninclusive list follows, for anyone who might possibly not be 
familiar with the hardware:

1. There is a Backspace key, but no Delete key. 2. No Insert key (useful 
in MC for highlighting files for various actions). 3. There are not PageUp 
nor PageDown keys. 4. The Home and End keys are missing, too. 5. The 
Function keys 1 through 10 are present, but they are not labeled as such 
because the default OS maps them to various hardware functionalities, such 
as more sound, less sound, more brightness, less brightness, and such. In 
Linux these are mapped to the usual F-* keys, and it is not obvious how to 
recover their "original" functionality at the moment. That is a 
longer-term project. 6. There is no Fn key of the type common on many 
laptops. This hurts, actually. So it cannot be used to modify the behavior 
of anything, neither the F-* keys nor anything else. 7. There is a 
"search" key at the left of the keyboard, which does absolutely nothing in 
the Linux console. It gives the same keycode response if 125 (as seen from 
the showkey command) as the "windows" key on a regular PC keyboard.

I have been working with the console keymap files, supplying missing 
functionality due to the missing keys, and I have solved some of the 
problems -- so long as one stays purely in the console. The following all 
seem to work:

1. altgr-backspace key deletes the character instead of the previous one 
(altgr is also known as the right alt key and the leftalt key is just 
called "alt" in the console keymap file)

2. control-alt-altgr-backspace reboots the machine

3. altgr-uparrow does PageUp
4. shift-altgr-uparrow scrolls the console up
5 and 6 similar to 4 and 5 for the downarrow key
7. altgr-leftarrow does "Home"
8. altgr-rightarrow does "End"
9. Mapped the "search" key to Insert.

All of the above are done by suitable editing of the file 
which is found in /usr/share/kbd/keymaps/i386

I have not yet begun to work on the X keymappings which I understand are 

But the next thing on the list is to figure out what to do in Midnight 
Commander. Or, perhaps better, in the editor.

What I discovered so far is that, 

1. the mc editor understands some of what I did and is ignorant of other 
things that I did. For example:

--when mc is started, then the command line at the bottom is ignorant of 
what I did, except that the functionality does come back if one does 
control-o and thereby puts the mc screen in the background.

-- the Insert key works, both for highlighting files and also in the 
editor. It also toggles, as it should.

-- the PageUp and PageDown functionality does not work in the panels.

-- in the editor things are rather chaotic. The new PageUP and PageDown 
functionality works in the editor, but the new delete-character function 
does not. Also the new Home and End functions do not work.

-- the Learn Keys option could not understand anything which I had done, 

So, when all else fails one should read the man page, where there is a 
section called "Redefine hotkey bindings." So I went and got a copy of the 
file and put it in a local directory to fool with.

When I opened the mc.keymap file, I was a little bit puzzled. There is no 
way there to distinguish between the two keys which the default terminal 
keymap file calls, separately, by the names alt and altgr (in which alt is 
left alt and altgr is right alt). 

Let us take as a specific example the "Delete" functionality in the 
editor. One of the problems, to be sure, is that under the [editor] 
section the default behavior of Delete is listed as "delete, cntrl-d" and 
backspace is listed differently. Now, cntrl-d does work.

But, very unfortunately, the console keymap (which is actually pretty much 
the same as the keymap file on a PC) lists the key number 14 (which has an 
arrow pointing left on it, or the word "Backspace" on some keyboards) as 
doing Delete, but it does what the rest of us call Backspace instead. The 
key on a regular PC keyboard which has the keycode 111 and which has the 
name "Delete" on it, is, as I said, not present on the Samsung Chromebook 
keyboard. The console keymap file says the action of this key with keycode 
111 is "Remove" instead of "Delete." Thus in the console keymap file I 
mapped altgr keycode 14 to "Remove" in order to get that functionality 
back again. 

Unfortunately, the mc.keymap file does not seem to understand what I did, 
and no visible method of passing this functionality into the mc.keymap 
file is obvious. Similar remarks pertain to the functionality of the Home 
and End keys. I cannot seem to make them work, either.

Suggestions from the knowledgeable are most welcome.

Theodore Kilgore

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]