DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th March 2018
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default wsconsctl.conf variables

Hi.

I searched how-to reduce the keyboard delay.
The problem is that the wsconsctl(8) man's page contains only few examples, not an entire list, and nothing to help me.
I found wsconsctl.conf variables on the net :
Code:
keyboard.repeat.del1=1
keyboard.repeat.deln=1
But that was on an non-official website.
Is there an official list of wsconsctl.conf variables/parameters ?
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD

Last edited by LeFrettchen; 4th March 2018 at 01:02 AM. Reason: Clarity
Reply With Quote
  #2   (View Single Post)  
Old 4th March 2018
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

For base config files, always check in /etc/examples/
Reply With Quote
  #3   (View Single Post)  
Old 4th March 2018
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

LeFrettchen does have a point. The wsconsctl(8) manpage only contains a subset of the possible variables as does /etc/examples/wsconsctl.conf, by the way.

/etc/examples/wsconstcl.conf:
Code:
keyboard.repeat.del1=200   # change keyboard repeat/delay
keyboard.repeat.deln=50
keyboard.encoding=ru       # use different keyboard encoding
keyboard.bell.volume=0     # mute keyboard beep
display.vblank=on      # enable vertical sync blank for screen burner
display.screen_off=60000   # set screen burner timeout to 60 seconds
display.msact=off      # disable screen unburn w/ mouse
Additional variables from the manpage:
Code:
keyboard.bell.pitch=1200
keyboard.bell.pitch+=200
keyboard.map+="keysym Caps_Lock = Control_L"
Two more variables that are hidden in the FAQ(7)
Code:
display.kbdact if set to on, keyboard activity will unblank the screen.
display.outact if set to on, screen output will unblank the screen.
This list above may or may not be exhaustive.
Reply With Quote
  #4   (View Single Post)  
Old 4th March 2018
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

I think you can use

# wsconsctl -a

to print all the variables and their current settings. Granted the meaning of the variables and the range of allowed values needs to be gleaned somehow.
Reply With Quote
  #5   (View Single Post)  
Old 4th March 2018
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

Thanks IdOp, I think that's the best solution
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #6   (View Single Post)  
Old 4th March 2018
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

You're welcome. I think the references given by the other posters are very helpful to interpret and use the variables they reference.
Reply With Quote
  #7   (View Single Post)  
Old 17th December 2019
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 65
Default

Hi Le Frettchen,
Thanks for posting this question. I was looking for the complete list of wsconsctl.conf variables just yesterday.
Reply With Quote
  #8   (View Single Post)  
Old 24th December 2019
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

You're welcome
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
  #9   (View Single Post)  
Old 3rd January 2020
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default wsconsctl sources

Hi LeFrettchen and Hi Le Frettchen.
Are you still interested in this topic?
If yes, I write how I searched for information and what I found.
I tried to check if the source code is documented and how much.
I found that it is documented indeed, but I don't know if developers have something more than the comments in their sources.

I downloaded and extracted
src.tar.gz
and
sys.tar.gz
from a mirror of OpenBSD.
Suppose the extracted trees are in /home/user/src and /home/user/sys/sys
(extracting src.tar.gz, it doesn't create another src directory; extracting sys.tar.gz it creates another sys directory).

The c-source that contains the definitions of keyboard variables managed by wsconsctl is
/home/user/src/sbin/wsconsctl/keyboard.c

keyboard.c defines a table of all these varables:
Code:
struct field keyboard_field_tab[] = {
    { "type",                   &kbtype,        FMT_KBDTYPE,    FLG_RDONLY },
    { "bell.pitch",             &bell.pitch,    FMT_UINT,       FLG_MODIFY },
    { "bell.period",            &bell.period,   FMT_UINT,       FLG_MODIFY },
    { "bell.volume",            &bell.volume,   FMT_UINT,       FLG_MODIFY },
    { "bell.pitch.default",     &dfbell.pitch,  FMT_UINT,       FLG_MODIFY },
    { "bell.period.default",    &dfbell.period, FMT_UINT,       FLG_MODIFY },
    { "bell.volume.default",    &dfbell.volume, FMT_UINT,       FLG_MODIFY },
    { "map",                    &kbmap,         FMT_KBMAP,      FLG_MODIFY|FLG_N
OAUTO },
    { "repeat.del1",            &repeat.del1,   FMT_UINT,       FLG_MODIFY },
    { "repeat.deln",            &repeat.delN,   FMT_UINT,       FLG_MODIFY },
    { "repeat.del1.default",    &dfrepeat.del1, FMT_UINT,       FLG_MODIFY },
    { "repeat.deln.default",    &dfrepeat.delN, FMT_UINT,       FLG_MODIFY },
    { "ledstate",               &ledstate,      FMT_UINT,       0 },
    { "encoding",               &kbdencoding,   FMT_KBDENC,     FLG_MODIFY },
    { "backlight",              &backlight,     FMT_PC,         FLG_MODIFY|FLG_I
NIT },
    { NULL }
};
Let's focus on repeat and dfrepeat variables that you can see in the definition of the table.
These variables are declared in keyboard.c as structures of type
wskbd_keyrepeat_data:

Code:
static struct wskbd_keyrepeat_data repeat;
static struct wskbd_keyrepeat_data dfrepeat;
keyboard.c includes also
Code:
 #include <dev/wscons/wsksymdef.h>
 #include <dev/wscons/wsconsio.h>
 #include "wsconsctl.h"
Searching with grep for "wskbd_keyrepeat_data" I found it only in
/home/user/sys/sys/dev/wscons/wsconsio.h
/home/user/sys/sys/dev/wscons/wskbd.c

I opened wsconsio.h and I found

Code:
/* Manipulate the emulation key repeat settings. */
struct wskbd_keyrepeat_data {
        u_int   which;                          /* values to get/set */
        u_int   del1;                           /* delay before first, ms */
        u_int   delN;                           /* delay before rest, ms */
};
So I understand that del1 is the time, in milliseconds, before the first event and delN the time in milliseconds before subsequent events.
I don't understand completely the meaning of the "default" version of the same variables.

Also /home/user/sys/sys/dev/wscons/wskbd.c is interesting.

It seems to me that it is possible to investigate about every variable and extract information about them.
If you want, we can join our efforts and create a file with the information we find.
It's not easy, but it's been very instructive and funny to me.
Ciao!!
Reply With Quote
Old 3rd January 2020
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default

I forgot gustaf. Hi gustaf!
Reply With Quote
Old 4th January 2020
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

Hi attilio, and thanks for this great job !
I wonder why I did not think about this by myself.

Anyway, thanks, that was a great idea, very useful
__________________
ThinkPad W500 P8700 6GB HD3650 - faultry
ThinkStation P700 2x2620v3 32GB 1050ti 3xSSD 1xHDD
Reply With Quote
Old 5th January 2020
attilio attilio is offline
Port Guard
 
Join Date: Jun 2015
Posts: 43
Default

Thanks to you.
Your question brought me to download the sources. I never did it before.
And so I discovered also the answer to another question I posted some days ago on "openBSD general", about libc:
using only man pages I wasn't able to see libc's structure (the list of functions declared in a header, for example string.h).
With the sources tree one can see everything and, for specific information, can look at man pages.
So your question made me understand something more.
Have a nice day.
Ciao.
Reply With Quote
Reply

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
wsconsctl elusive keycodes radix OpenBSD General 15 8th March 2015 08:17 PM
FreeBSD jail inherited user accounts and env variables sysfu FreeBSD General 0 3rd November 2013 05:01 PM
IPFW and sysctl variables questions unixjingleman FreeBSD Security 1 12th June 2011 03:33 AM
Dereferencing sh variables J65nko Programming 3 29th January 2010 02:34 AM
passing make args/variables to builds of prerequisite ports jbhappy FreeBSD Ports and Packages 2 18th July 2008 02:35 PM


All times are GMT. The time now is 06:17 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