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 3rd February 2013
tehsean tehsean is offline
Custom User
 
Join Date: Aug 2010
Posts: 22
Default StickyKeys -esque functionality in CLI?

In X, there's xkbset, which you can use to turn on StickyKeys. StickyKeys, for those unfamiliar, allows the modifier keys (Shift and Ctrl) to 'stick' until the next key press. It's handy for those with accessibility issues, and in my case, for a PC that has a thumb-board as the default text input.

Is there any way to have this same StickyKeys behavior in the terminal?

From what I've read, you can change the keymaps with wsconsctl, but it looks like /usr/include/dev/wscons/wsksymdef.h doesn't have a keycode for sticky modifiers, so even if I change the keymap, it may not help.

Also, is there a way to see the key event codes as keys are pressed?
I would like to make a shortcut key for terminal switching, as the current stroke is a 4 key monstrosity (FN+CTRL+ALT+[1-5].

Thanks in advance~

Last edited by tehsean; 3rd February 2013 at 04:33 AM. Reason: durr- wrong program name
Reply With Quote
  #2   (View Single Post)  
Old 3rd February 2013
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

Quote:
Originally Posted by tehsean View Post
I would like to make a shortcut key for terminal switching, as the current stroke is a 4 key monstrosity (FN+CTRL+ALT+[1-5].
I would have thought terminal switching is a 3-key mini-monstrosity: Ctrl-Alt-F[1-5] ?

In any event, in this thread I reported a way to switch wsconsoles with two keys, as in Alt-F[1-5]. Hopefully it still works in OpenBSD, I haven't tried it lately.

Sorry I don't have answers for the other keyboard issues you raised.
Reply With Quote
  #3   (View Single Post)  
Old 3rd February 2013
tehsean tehsean is offline
Custom User
 
Join Date: Aug 2010
Posts: 22
Default

Quote:
Originally Posted by IdOp View Post
I would have thought terminal switching is a 3-key mini-monstrosity: Ctrl-Alt-F[1-5] ?
It is when you have dedicated F1-F10 keys. For laptops and other exotic hardware, the Fn key comes into play.

Thanks for the tip, I'll try this out and see where it gets me.
The thumb board on this computer only has one (left) shift key. If I can remap one of the other keys on the right side to shift, that might work as well as sticky keys.

On a totally random note, does this board support 'Thanks' points? I see that some people have been thanked, but I don't see a way to mark a thread as 'Thanks'ed.

Last edited by tehsean; 3rd February 2013 at 04:32 PM.
Reply With Quote
  #4   (View Single Post)  
Old 3rd February 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Re: Thanks button

For an explanation see http://www.daemonforums.org/showthre...6300#post46300
__________________
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
  #5   (View Single Post)  
Old 4th February 2013
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

Quote:
Originally Posted by tehsean View Post
It is when you have dedicated F1-F10 keys. For laptops and other exotic hardware, the Fn key comes into play.
Ah, makes sense. Luckily my laptop has dedicated FN keys.

Quote:
The thumb board on this computer only has one (left) shift key. If I can remap one of the other keys on the right side to shift, that might work as well as sticky keys.
Thumb board ... yet another bit of hardware I've never seen.
Reply With Quote
  #6   (View Single Post)  
Old 22nd April 2013
tehsean tehsean is offline
Custom User
 
Join Date: Aug 2010
Posts: 22
Default

Sorry to bring this back from the grave, but I wanted to thank IdOp for the great response.

I also wanted to add a bit of information that I found that helped me out.

I have successfully changed the Menu key to Shift_R on the Sony Vaio UX with the following:
Code:
wsconsctl keyboard.map+="keysym Menu = Shift_R"
For reference to others, if you are trying to figure out what keycode or keysym a key transmits when pressed, ONE way to find out is in X, with the 'xev' program. It displays X events, including key presses. There may be other ways but this was easy enough for me.

I originally tried to add the keycode manually. In my case, the thumb board transmits a keycode of 117 for the Menu key (reported by xev). This DID NOT WORK:
Code:
wsconsctl keyboard.map+="keycode 117 = Shift_R"
Looking at the keyboard.map, there was no code already assigned for 117, so I'm not sure why it didn't work. My best guess is that the kernel ignores this keycode. I believe the answer may lie in wskeysyms.h .If anyone knows, I'd love to hear your thoughts.

The other thing left is to reassign the Delete key to Control_R. From what I've read, this may be harder due to the way that the terminal handles Delete and BackSpace. So far any mappings I have attempted have only managed to break the backspace key in the console.

For additional reference, if you DO wind up messing up your keylayout, you can clear the configuration pretty quickly by reassigning the keyboard encoding. In my case, this is US:
Code:
wsconsctl keyboard.encoding=us
This reverts the keyboard layout back to stock, removing any += modifiers you may have made in the terminal session you are currently in.
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
Debian checkinstall style functionality for pkg_create command? sysfu OpenBSD Packages and Ports 3 29th October 2008 11:06 AM


All times are GMT. The time now is 09:22 PM.


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