Are Enter Keys Coded Differently?

Colin Law clanlaw at googlemail.com
Fri Jul 12 15:00:52 UTC 2013


On 12 July 2013 13:16, Graham Todd <gct7photography at gmail.com> wrote:
> X-GPG Key: : 20D1C4702D00C69A
> Mime-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
>
> On Thu, 11 Jul 2013 11:48:29 -0400
> Doug <dmcgarrett at optonline.net> wrote:
>
>> Amend my previous reply: Running showkey (need root perms) on my kb
>> gives 96 for the far right enter key and 28 for the normal enter key.
>> This is on an IBM model M keyboard, which works fine with any American
>> computer. I don't know what the other layout was for.
>> Sorry for the misinformation earlier.
>> --doug
>
> Thanks Doug, that was very helpful.
>
> First of all, I'm using a Genius keyboard, keymapped to English (GB). I
> get the same codes as you when pressing the same keys (Normal Entry
> key=28, Far Right Enter key=96).
>
> There are obviously two different codes for some reason, but it still
> eludes me, as the keys are supposed to be for the same purpose.

The key codes come from the keyboard, and are different because they
are physically different keys.  The keyboard manufacturer does not
know whether someone might want to differentiate between the two keys.
 Similarly the left and right shift keys generate different codes.  It
is up to the OS/App to decide whether the two enter keys are the same.

Which app were you using when you entered the pass phrase?  It does
seem odd that when you re-enter the phrase you have to use the same
enter key as when you initially entered it.  Have you definitely
confirmed that this is the case?  Can you give more details of what
you were doing so we can try to replicate it?

Colin




More information about the ubuntu-users mailing list