Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: Richa Rd on November 08, 2020, 11:36:22 PM
-
TC 11.1 terminal extension Aterm. Enter key is not executing the command I enter. I have to use Shift-Enter combo to execute command. Is this normal for Aterm?. Note Rxvt works ok for me.
-
Hi Richa Rd
Welcome to the forum.
The aterm extension for x86_64 was introduced in TC5:
http://tinycorelinux.net/5.x/x86_64/tcz/aterm.tcz.info
The extension remains unchanged in TC11:
http://tinycorelinux.net/11.x/x86_64/tcz/aterm.tcz.info
I have run aterm under TC10 x86_64 and have not witnessed such behavior.
-
Hi Richa Rd
I just realized I only gave you an answer for the 64 bit version. The same answer applies to the 32 bit version. I use aterm under
32 bit TC10 every day without issue.
-
Thanks Rich for your reply. I recall having the same problem on another small distro, but I can't remember which one. I will continue investigation.
-
Hi Richa Rd
Maybe something you altered:
1. ~/.ashrc
2. ~/.profile
3. Did you change the default shell to bash ?
4. ~/.bashrc
5. Does executing stty sane resolve the issue?
Just trying to jog your memory since you say you experienced this before.
-
Hi Rich,
I am using the default shell and I have not altered anything. I use the 32 bit versions and have tried TC and TC Plus.
Executing stty sane does not fix it.
When using the CLI version, the <enter> key works ok.
Also I have connected a Logitech wireless keyboard & mouse combo via a usb dongle, and that keyboard <return> works ok on aterm.
It seems I have an incompatibility issue between aterm and Compaq Evo N1000c laptop keyboard.
-
Hi Richa Rd
Make sure you have Xlibs.tcz installed. You said Shift-Enter works. Using the laptops keyboard, run the following
command in aterm:
xmodmap -pke > keys.txt
Attach the keys.txt file to your next post.
-
Hi Rich, keys.txt file attached as requested.
-
Hi Richa Rd
Does executing this fix it:
xmodmap -e "keycode 36 = Return NoSymbol Return"
-
Hi Rich, that command made no difference.
I have also noticed Xvesa and Wifi setup screens when I hit Enter they return ^[OM on the screen instead of executing. Only Shift+Enter executes.
-
Hi, guys!
Richa Rd, is this issue present in pure console?
-
Hi Jazzbiker, refer to reply #5... Pure console (CLI) works ok, also a Logitech wireless keyboard works ok. Also if I load an alternate terminal extension rxvt, then rxvt works ok. I could replace aterm with rxvt, but sticking to TC philosophy of small is good I would prefer to use aterm (aterm 53KB v rxvt 368 KB).
-
Oh, "CLI version" for me is not the same as pure console ) If You like minimalism, try st.tcz. And there exists showkey.tcz in TC4 repo. But be careful, don't run it in console simultaneously with already running X. Maybe Your keyboard produces strange keycode sequences, which are interpreted correctly by rxvt but are fooling aterm.
-
I installed st in place of aterm and the <enter> key worked ok, however st.tcz does not integrate with Control Panel tools ie. Terminal Server and Xvesa Setup and also the Wifi tool, which all failed to work.
Installed showkey.tcz from TC4 repo, run it from console, but it froze my screen waiting for a key press and not timing out after 10 secs.
Required a hard power off to reload TC. I might have to go with rxvt with this laptop.
-
Hi, Richa Rd!
Yes, the TinyCore Xprogs (Control Panel, Apps and friends) unconditionally try to start aterm, and if You install st instead of aterm You can easily propose it instead of aterm for other TinyCore stuff members. For example place in Your ~/.local/bin directory (it is included in $PATH) the following file, named aterm and having execution permissions and redirecting to st:
cat > ~/.local/bin/aterm << EOF
#!/bin/sh
exec /usr/local/bin/st -f Fixed:pixelsize=15:style=bold "$@"
EOF
chmod +x ~/.local/bin/aterm
And all TinyCore programs will work well.
St has some pleasant features:
1. It don't deliver mouse events to the in-running programs.
2. It can deal with both X clipboard buffers. Ctrl-Shift-C and Ctrl-Shift-V for one of them and simply select with mouse and Shift-Ins for the other.
3. You can instantly adjust Your font size with Ctrl-Shift-PgUp and Ctrl-Shift-PgDn.
rxvt in no doubt is the champion. But for me st is favorite :-)
What options You were using to start showkey? In ascii mode (-a) it exits at Ctrl-D.
-
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.
-
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. ::)
-
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.
-
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.
-
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.
-
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
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?
-
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
-
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
xmodmap -pke > your.xmap
-
And
xmodmap -pm > your.xmod
please
-
Hi jazzbiker
... P.S. I am not sure, that it will be useful, but, please, attach the
xmodmap -pke > your.xmap
He already did that:
http://forum.tinycorelinux.net/index.php/topic,24448.msg155101.html#msg155101
... 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?
-
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.
-
Hi, Richa Rd!
You have loaded kbd-2.3.0.tar.xz. Copy it to /tmp directory. Then
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.
-
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.
-
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
press any key (program terminates 10s after last keypress)...
visible on the screen?
Can You please post the result of
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
if (ioctl(fd, KDSKBMODE, show_keycodes ? K_MEDIUMRAW : K_RAW)) {
kbd_error(EXIT_FAILURE, errno, "ioctl KDSKBMODE");
For exiting keycodes code path uses
signal(SIGALRM, watch_dog);
and 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.
-
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...
-
Hi, Richa Rd!
Why so many mice in Your configuration? I see 3. And all of them declaring
capabilities: i8042
which is keyboard controller chip. For example in my box mouse driver doesn't declare anything about i8042. The -s and -k options leads to the same program loop, the difference is only in the prepending this loop ioctl() call parameter, so we can definitely conclude that this is the driver issue. I see, that Your installed touchpad is Synaptics. Is it possible to switch it off using BIOS?
-
You can try to boot with
i8042.nomux=1 i8042.reset
kernel boot parameters to exclude interference between mice and keyboard.
Maybe
i8042.noaux=1
will have some effect.
-
By the way, searching on "compaq evo n1000c keyboard controller" proposes several links to some keyboard controller firmware update to v.15.29.
-
Hi Jazzbiker,
My problem is solved with the enter key not functioning correctly in aterm.
[quote ...By the way, searching on "compaq evo n1000c keyboard controller" proposes several links to some keyboard controller firmware update to v.15.29.
[/quote]
The laptop keyboard controller firmware was still at V.15.24. I upgraded it to V.15.29 using file HP SP31251.exe.
The enter key now behaves correctly in aterm.
Thanks to you and Rich for all your assistance.
-
Hi Richa Rd
Glad to hear you were able to solve this, and thank you for sharing the solution.