WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Aterm Enter Key Function  (Read 9928 times)

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #15 on: November 25, 2020, 05:58:52 PM »
Hi Jazzbiker, thank you for your assistance.
I reloaded showkey and used the -a option. It worked ok this time and displayed the following:=
enter key = ^M  13  0015 0x0d
Also shift+enter displayed the same data as enter on its own. Also ctrl+M displayed the same data.
I connected the wireless keyboard and it displayed the same code for return and shift+return, but this keyboard works ok with aterm.

Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: Aterm Enter Key Function
« Reply #16 on: November 25, 2020, 10:39:58 PM »
Hi Richa Rd
This is clearly a case of Heisenberg uncertainty. ???

When used normally, the keyboards  Enter  key puts out bad data. Using a tool like showkey to measure the output
affects the measurement and causes the data to appear normal.  ::)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #17 on: November 26, 2020, 06:36:41 AM »
Hi, Rich!

You suppose quantum keyboard? It may appear to be very handy and power-saving, as it may work even if it is not connected due to tunneling effects! Sometimes, at least ... Just like about one time per billion years of pressing some key... 8-(

Hi, Richa Rd!

Have You intentions to continue investigation? To proceed we really need showkey not in ascii mode (-a) but both scancodes (-s) and keycodes (-k, default) modes. But this hanged Your box, are You sure, that X was not running at that moment? Sorry, I'm asking again, but I have never troubles with showkey and if we will not be able to retrieve info about Your keyboard, we will not be able to choose the direction to move.
If Your keyboard produce some non-standard keycodes we can try to cure it with setkeycodes utility, but we need to know the diagnosis.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: Aterm Enter Key Function
« Reply #18 on: November 26, 2020, 07:40:00 AM »
Hi Richa Rd
... And there exists showkey.tcz in TC4 repo. But be careful, don't run it in console simultaneously with already running X. ...
... Installed showkey.tcz from TC4 repo, run it from console, but it froze my screen waiting for a key press ...
If you switched to the console using  Ctrl-Alt-F1  then X was still running. You would need to:
1. Click on the exit icon.
2. Select  Exit to Prompt.
3. Click the  OK  button.
You will now be in the console without X running. To get back into X, enter  startx.

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #19 on: November 27, 2020, 05:57:16 PM »
Hi Jazzbiker & Rich,
I have been running showkey correctly from console (ie exitting from X to prompt).
The -h option works - indicates version 1.5
The -a option works ok.
The -s option rolls off the display and locks up the laptop.
The -k option runs waiting for key press, but no output displayed when any key pressed, also locks up the laptop.
Also the 10 sec timeout for -s and -k does not happen.
Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #20 on: November 27, 2020, 07:17:22 PM »
Hi, Richa Rd!

I'm sorry advising the program, not working well, but I have never heard about any troubles with it before. For some reasons it fails at Your hardware. It is quite aged (built in 2009) but I've checked the recent (2019) version, it is fully equivalent, the single difference is that newer version looks for one more device - /dev/systty. Probably it will be better to recompile it with the newer headers, lets wait what Rich will say.

Can You show
Code: [Select]
dmesg | grep keyboard
?

Not really matters, just for notice.

In Your previous post You wrote, that "showkey -a" worked in terminal emulator. But in which terminal? Is the difference present between the showkey outputs in aterm and urxvt?

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #21 on: November 28, 2020, 12:58:01 AM »
Hi Jazzbiker,

dmesg | grep keyboard returns...
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input4

I have only used showkey -a in console. But I just tried showkey -a in rxvt and then aterm and got different results...
rxvt displayed the following for <return> then <ctrl-d>
^M       13 0015 0x0d
^D         4 0004 0x04

aterm displayed the following for <return> then <ctrl-d>
 ^[OM     27 0033 0x1b
              79 0117 0x4f
              77 0115 0x4d
^D           4 0004 0x04

Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #22 on: November 28, 2020, 03:18:49 AM »
Hi, Richa Rd!

Funky esc-sequence. Someone shows it to us, probably X input subsystem. Can not say anything at that moment, will try to find how to deal with this and what does this means.

Sowkey (the part of kbd suiite) is better to be recompiled, I was wrong stating that there is the single difference. The second one is that newer (since 1.15) versions are checking console file descriptor on being not negative condition before ioctl-ing it. This package is quite  easy to compile, I think, that it would be better, that You compiled this package and repeat pure console testing with the updated version. Sources can be obtained at https://mirrors.edge.kernel.org/pub/linux/utils/kbd/kbd-2.3.0.tar.xz.
If You want I can post direct instructions.

What  X server do You use?

P.S. I am not sure, that it will be useful, but, please, attach the
Code: [Select]
xmodmap -pke > your.xmap
« Last Edit: November 28, 2020, 03:47:18 AM by jazzbiker »

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #23 on: November 28, 2020, 03:53:35 AM »
And
Code: [Select]
xmodmap -pm > your.xmod
please

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: Aterm Enter Key Function
« Reply #24 on: November 28, 2020, 10:25:46 AM »
Hi jazzbiker
... P.S. I am not sure, that it will be useful, but, please, attach the
Code: [Select]
xmodmap -pke > your.xmap
He already did that:
http://forum.tinycorelinux.net/index.php/topic,24448.msg155101.html#msg155101

Quote
... What  X server do You use? ...
Base on his other posts, I think it's  Xvesa.  I'm beginning to wonder if Xvesa is the problem?

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #25 on: November 29, 2020, 11:33:33 PM »
Hi Jazzbiker & Rich,
yes I am using Xvesa for X server, and attached is the xmodmap -pm reply.
And thank you, I have downloaded the new kbd-2.3.0 tar.gz and would like instructions on how to compile a new showkey.tcz.
Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #26 on: November 30, 2020, 01:45:38 AM »
Hi, Richa Rd!

You have loaded kbd-2.3.0.tar.xz. Copy it to /tmp directory. Then
Code: [Select]
tar x -Jvf kbd-2.3.0.tar.xz
cd kbd-2.3.0
tce-load -w compiletc
tce-load -i compiletc
./configure --disable-vlock --disable-tests
make

In /tmp/kbd-2.3.0/src You will find compiled binaries and among them new showkey. Please test it again without X, with -k and -a options. Please, describe results, I hope the new version will not hang up Your system, but of course I can'd be absolutely sure.

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #27 on: December 06, 2020, 04:52:38 PM »
Hi Jazzbiker,
I compiled the new kbd-2.3.0 and ran showkey, but it exhibited the same lockups as before for -s and -k options.
I loaded TC Plus 32 bit OS into my daily drive laptop (Toshiba Satellite Pro) and ran showkey which worked perfectly with all options.
I also replaced Xvesa with Xorg in the Compaq Evo, and aterm <enter> key still does not work on its own, still requires <shift-enter>.
I think my solution is to replace aterm with rxvt on the Compaq laptop.


Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Aterm Enter Key Function
« Reply #28 on: December 07, 2020, 04:16:32 AM »
Hi, Richa Rd!

Are You using the default locale? Do You define any keymap in the bootcodes string, or do You use loadkmap in Your bootlocal.sh?

I guess - no, but just to be sure.

I don't ask You to hang up Your computer again with this program, but can You remember, when it was already hanged up, was the message
Code: [Select]
press any key (program terminates 10s after last keypress)...
visible on the screen?

Can You please post the result of
Code: [Select]
tce-load -w lshw
tce-load -i lshw
sudo lshw -C input
?


Hi, Rich!

The differences between the showkey.c program flows for -a and for -k or -s options are
-a) it uses fd=0 for read()
-k, -s) fd=getfd() and then 
Code: [Select]
if (ioctl(fd, KDSKBMODE, show_keycodes ? K_MEDIUMRAW : K_RAW)) {
                kbd_error(EXIT_FAILURE, errno, "ioctl KDSKBMODE");

For exiting keycodes code path uses
Code: [Select]
signal(SIGALRM, watch_dog); and
Code: [Select]
alarm(10); in the reading loop, so if the program hangs up hardly it means the serious trouble, right?
If I was at Richa Rd's place i will start some background process (music player f.e.) prior to run showkey, to check wether only keyboard is blocked or everything dies. But if SIGALRM is not functioning it means total disaster.

Offline Richa Rd

  • Newbie
  • *
  • Posts: 19
Re: Aterm Enter Key Function
« Reply #29 on: December 09, 2020, 06:31:23 PM »
Hi Jazzbiker,
I am using the default locale and no keymap in the bootcodes string and no loadkmap in bootlocal.sh.

Re showkey responses
-k freezes with "press any key (program terminates 10s after last keypress)..."
-s the text rolls off the screen before I can read it.
I piped the -s output to a text file which filled up with over 1 million lines of blank lines (new lines).
The 10 Sec timeout never happens.

Attached is lshw output...
Compaq Evo N1000c P4 cpu 1GB ram 80GB hdd