DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th December 2023
mafkees1233 mafkees1233 is offline
Eager student
 
Join Date: Apr 2019
Location: Cove, Scotland
Posts: 47
Default Enter key not working with pccon0 terminal

Hello,

I like to have cmus playing music on console. The default vt220 terminal doesn't do colors, so I changed it to pccon0.
Now when I run cmus the enter key doesn't work. It does work on the v220 terminal.
Do any of you clever folks have any idea what that could be?
__________________
Nothing is more boring than a working computer.
Reply With Quote
  #2   (View Single Post)  
Old 20th December 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

This is a wild guess: the US 104 key PC Keyboard has two different Enter keys, which may be treated as unique functions. One of the Enter keys is on the number pad, and the other on the main key pad. Here's an example image I've pulled from Google, where you can see both Enter keys. One is above the right side Shift key, the other is along the right edge of the keyboard, at the bottom right of the number pad.




I happen to use an application at $DAYJOB which treats these two Enter keys differently.
Reply With Quote
  #3   (View Single Post)  
Old 20th December 2023
mafkees1233 mafkees1233 is offline
Eager student
 
Join Date: Apr 2019
Location: Cove, Scotland
Posts: 47
Default

Thanks for your reply. It's a british keyboard with only one enter key. It's a laptop
__________________
Nothing is more boring than a working computer.
Reply With Quote
  #4   (View Single Post)  
Old 20th December 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

Yep, some of these keyboards may name them Return and Enter; others may have them both be named Enter. In the pckbd(4) driver source code, it names them Return and Enter. (/usr/src/sys/dev/pckbc/pckbd.c)
Reply With Quote
  #5   (View Single Post)  
Old 21st December 2023
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,159
Default

Probably you could fix this in the /etc/termcap file. See termcap(5) for more info about the file/entry format. /etc/termcap is a text source file that needs to be compiled or converted into a binary hash database file.

Warning: termcap(5) refers to
Code:
FILES
     /usr/share/misc/termcap     File containing terminal descriptions.
     /usr/share/misc/termcap.db  Hash database file containing terminal
                                 descriptions (see cap_mkdb(1))
So I wonder why the file in /etc/ is not mentioned in the manual page. In my system the corresponding compiled hash database *db files are also missing.
There is also terminfo(5) that seem to apply for programs compiled with the curses program.

So what I described above, may have been true when the dinosaurs roamed the Unix world, and not be true in our times. In that case it just is a history lesson.
Maybe you could ask on the official misc mailing list.

EDIT: from the termcap file
Code:
:vt220-8bit|vt220-8|vt200-8bit|vt200-8|dec vt220/200 in 8-bit mode:\
        :am:bs:mi:ms:xn:xo:\
        :co#80:it#8:li#24:vt#3:\
        :AL=\233%dL:DC=\233%dP:DL=\233%dM:DO=\233%dB:IC=\233%d@:\
        :LE=\233%dD:RI=\233%dC:UP=\233%dA:ae=\E(B:al=\233L:\
        :as=\E(0:bl=^G:cd=\233J:ce=\233K:cl=\233H\233J:\
        :cm=\233%i%d;%dH:cr=^M:cs=\233%i%d;%dr:ct=\2333g:\
So here the ENTER key or cr is defined as CNTRL-M.
But:
Code:
 pccon+keys|OpenBSD PC keyboard keys:\
        :&2=^R:@7=\E[8~:@8=^M:F1=\E[23~:F2=\E[24~:F3=\E[25~:\
        :F4=\E[26~:F5=\E[28~:F6=\E[29~:F7=\E[31~:F8=\E[32~:\
        :F9=\E[33~:FA=\E[34~:FB=\E[35~:FC=\E[36~:FD=\E[37~:\
        :FE=\E[38~:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:\
        :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\
        :k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:\
        :kd=\E[B:kh=\E[7~:kl=\E[D:kr=\E[C:ku=\E[A:
pccon+sgr+acs0|sgr and simple ASCII pseudographics for OpenBSD PC console:\
        :ac=+>,<-^.v0#`+a\:f\\h#i#j+k+l+m+n+o~p-q-r-s_t+u+v+w+x|y#z#{*|!}#~o:\
        :me=\E[m:\
        :..sa=\E[0%?%p1%p3%|%t;7%;%?%p6%t;1%;%?%p2%t;4%;m:
pccon+sgr+acs|sgr and default ASCII pseudographics for OpenBSD PC console:\
        :ac=++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
        :ae=\E(B:as=\E(0:eA=\E)0:me=\E[m\E(B:\
        :..sa=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>:
# underline renders as color
pccon+colors|ANSI colors for OpenBSD PC console:\
        :ut:\
        :Co#8:NC#2:pa#64:\
        :AB=\E[4%dm:AF=\E[3%dm:op=\E[47;30m:
pccon+base|base capabilities for OpenBSD PC console:\
        :5i:NP:am:km:ms:nx:xn:xo:\
        :co#80:it#8:li#24:\
        :DC=\E[%dP:IC=\E[%d@:RA=\E[?7l:SA=\E[?7h:al=\E[L:bl=^G:\
        :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:\
        :cr=^M:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ec=\E[%dX:ei=:ho=\E[H:\
        :im=:le=^H:md=\E[1m:mr=\E[7m:nd=\E[C:nw=\EE:rs=\Ec:\
        :se=\E[27m:sf=\ED:so=\E[7m:sr=\EM:st=\EH:ta=^I:\
        :u6=\E[%i%d;%dR:u7=\E[6n:ue=\E[24m:up=\E[A:us=\E[4m:
pccon0-m|OpenBSD PC console without colors & with simple ASCII pseudographics:\
        :tc=pccon+sgr+acs0:tc=pccon+base:tc=pccon+keys:
pccon0|OpenBSD PC console with simple ASCII pseudographics:\
        :tc=pccon0-m:tc=pccon+colors:
pccon-m|OpenBSD PC console without colors:\
        :tc=pccon+base:tc=pccon+sgr+acs:tc=pccon+keys:
pccon|OpenBSD PC console:\
        :tc=pccon-m:tc=pccon+colors:
The tc means to include or import the description of the entry. If you trace back these tc= entries for pccon you see that pc+base is included. And that entry also defines cr CNTRL-M (ASCII decimal code 13).
I am lost
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 21st December 2023
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 8,020
Default

The source for /etc/termcap can be found in /usr/src/share/termtypes/termtypes.master.
Reply With Quote
Reply

Tags
cmus, terminal

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Enter BIOS ramib OpenBSD General 8 13th February 2015 11:06 PM
FreeBSD 9.0 and PC-BSD 9.0 enter beta J65nko News 0 3rd August 2011 10:24 PM
HOWTO: Encoding // Pure Terminal // Virtual Terminal vermaden Guides 1 25th June 2010 08:02 AM
Mouse:X (not-working) and tty-Console (working), in 8.0 ykt FreeBSD General 1 22nd December 2009 12:26 PM
terminal darken FreeBSD General 8 18th July 2008 07:12 PM


All times are GMT. The time now is 01:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick