Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Use your useless keys
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
kKDu
Apprentice
Apprentice


Joined: 18 Aug 2003
Posts: 187

PostPosted: Sun Nov 02, 2003 12:02 pm    Post subject: Use your useless keys Reply with quote

I don't use my Num Lock Keys. So I decided to put some usefull commands on it, like xmms --play-pause.
This will work with all keys on your keyboard.

1) Install lineakd
Code:
ACCEPT_KEYWORDS=~x86 emerge lineakd

I use 0.4_pre3, but at the moment 0.7 is the current version. This HOWTO is for 0.4_pre3 and I don't know, if it would work with 0.7, too.

2) Configure your keyboard
First you have to find out which numbers belong to which keys.
Start /usr/X11R6/bin/xev and press the keys, that you don't use at all. This provides a output like this, where keycode 42 is the relevant number.
Code:

KeyRelease event, serial 25, synthetic NO, window 0x2a00001,
    root 0x39, subw 0x0, time 2488094, (4,327), root:(14,398),
    state 0x0, keycode 42 (keysym 0x67, g), same_screen YES,
    XLookupString gives 1 bytes:  "g"


This number you have to connect with your own notation in lineakkb.def
Code:
vim /etc/lineakkb.def


Code:
#### Own Keyboard Logitech Deluxe ####
                                                                                                                           
[Logitech_DAK]
 brandname = "Logitech"
 modelname = "Deluxe Access Keyboard own"
  [KEYS]
   internet    = 178
   mail                = 236
   search              = 229
   rightarrow = 85
   leftarrow = 83
   uparrow = 80
   downarrow = 88
   five = 84
   end = 87
   uparrowbild = 81
   downarrowbild = 89
   pos1 = 79
   einfg = 90
   entf = 91
   enter = 108
   plus = 86
   minus = 82
   multiply = 63
   divide = 112
  [END KEYS]
[END Logitech_DAK]
#end own keyboard


3) Put commands on the keys
Create a lineak directory and a config-file in your home directory.
Code:
cd
mkdir .lineak
cd .lineak
vim lineakd.conf


In this config file you define the commands:
Code:
# LinEAK Configuration file for Logitech Deluxe Access Keyboard own
                                                                                                                           
# Global settings
KeyboardType            = Logitech_DAK
CdromDevice             = /dev/hdc
MixerDevice             = /dev/mixer
                                                                                                                           
# Specific keys of your keyboard
internet        = "mozilla"
mail            = "sylpheed-claws"
search          = "xmmsfind_remote"
rightarrow     = "xmms --fwd"
leftarrow      = "xmms --rew"
uparrow       = "EAK_VOLUP"
downarrow      = "EAK_VOLDOWN"
five      = "xmms --play-pause"
end            = "xmms --stop"
uparrowbild   = "eject -t;mount /mnt/cdrom"
downarrowbild  = "umount /mnt/cdrom;eject"
pos1            =
einfg           =
entf            =
enter           = "charm-quark quit"
plus            = "strange-quark"
minus           = "charm-quark next"
multiply             = "charm-quark pause"
divide         = "charm-quark prev"
                                                                                                                           
# end lineakd.conf


EAK_VOLUP/DOWN is a build-in-function to change the sound-volume.
There are also EAK_MUTE and EAK_EJECT avaiable.

"eject -t;mount /mnt/cdrom" closes the cd-device and mount the cd.
charm-quark is also a music-player.

4) Start the daemon
Make a script like this:
Code:
#!/bin/bash
lineakd -b


Put it in /etc/X11/xinit/xinitrc.d/, this works for gnome and I think for others also.

5) Have fun :D
Back to top
View user's profile Send private message
zawze
n00b
n00b


Joined: 24 Oct 2002
Posts: 17
Location: Tau, Norway

PostPosted: Sun Nov 02, 2003 12:54 pm    Post subject: Reply with quote

Hello

Thanks for the guide, it finally made me do something about those extra keys on my laptop.
linkeakd -b reports that -b is an invalid option so I started it with "lineakd &". And added that to my ~/.xinitrc.
Back to top
View user's profile Send private message
kverastin
n00b
n00b


Joined: 27 Mar 2003
Posts: 10

PostPosted: Mon Nov 03, 2003 3:57 pm    Post subject: Hotkeys Reply with quote

you could do the same thing with Hotkeys (it's in portage)
Back to top
View user's profile Send private message
nicfit
n00b
n00b


Joined: 13 Aug 2003
Posts: 8
Location: Your mom's house!

PostPosted: Sun Nov 09, 2003 4:59 am    Post subject: Scroll-lock Reply with quote

I found a really good use for Scroll Lock. I've set sawfish to toggle sticky
mode on the window where I use the key. I dig it!

I use hotkeys for multimedia too, btw.

nicift
_________________
--
nicfit
Back to top
View user's profile Send private message
axxackall
l33t
l33t


Joined: 06 Nov 2002
Posts: 651
Location: Toronto, Ontario, 3rd Rock From Sun

PostPosted: Mon Nov 10, 2003 12:20 am    Post subject: Microsoft Natural keyboard Reply with quote

Imagine what you can do with Microsoft "Natural" keyboard. Besides traditionaly "useless" keys (which are not always useless, ScrollLock is used by KVM to switch between PCs, btw), it has 19 grey-color buttons, typically used only in Windows (and only with MS "natural" keyboard driver).

Some of button have alread very usefull signs on them. Personally I am going to use these ones:


    Refresh - can be "su emerge rsync";
    Search - can be dict client;
    Favorites - can be some folder at $HOME;
    Web - can be Galeon or Epiphany;
    Mail - can be Evolution;
    Mute - alsa
    Volume +
    Volume -
    Media - xmms
    My Computer - minimize all
    Calculator - Emacs? :)


Hmm... when will we ever have those touch-screen-based panels like in StarTreck?
_________________
"Lisp is a programmable programming language." - John Foderaro, CACM, September 1991
Back to top
View user's profile Send private message
Til_Eulenspiegel
n00b
n00b


Joined: 08 Nov 2002
Posts: 9
Location: Distance is dead; haven't you heard?

PostPosted: Sat Nov 15, 2003 9:48 am    Post subject: Reply with quote

Quote:

Hmm... when will we ever have those touch-screen-based panels like in StarTreck


Today. You buy them from Fingerworks. Zero-force typing with some auto-correction, doubles as a mouse or tablet with built-in gestures, programmable, and they work well on everything--Gentoo, Windows, OSucX, and even Solaris.

Yes, they cost a lot. I think they deserve to charge, given what you get.
_________________
Jay Dugger
Sometimes the delete key serves best.
Back to top
View user's profile Send private message
axxackall
l33t
l33t


Joined: 06 Nov 2002
Posts: 651
Location: Toronto, Ontario, 3rd Rock From Sun

PostPosted: Sun Nov 16, 2003 12:38 am    Post subject: Reply with quote

Til_Eulenspiegel wrote:
Quote:

Hmm... when will we ever have those touch-screen-based panels like in StarTreck


Today. You buy them from Fingerworks. Zero-force typing with some auto-correction, doubles as a mouse or tablet with built-in gestures, programmable, and they work well on everything--Gentoo, Windows, OSucX, and even Solaris.

Yes, they cost a lot. I think they deserve to charge, given what you get.


They certainly do not deserve what they charge. For that price I expect that the keyboard software will be able to change shape and size of individual keys, their layout and all of that -on the fly.

Almost forgot - besides typing we use keys for navigation, right? Same as menu in GUI, right? I hope you've got my point - I need my non-context menu to be displayed on the keyboard (or I should say - on the keyboard touch-screen), not on the main screen.

Ok, I'll wait another 5 years.
_________________
"Lisp is a programmable programming language." - John Foderaro, CACM, September 1991
Back to top
View user's profile Send private message
tonyg_2
n00b
n00b


Joined: 12 Jun 2003
Posts: 61
Location: Ottawa

PostPosted: Mon Aug 30, 2004 6:19 pm    Post subject: Reply with quote

Although I own a touchstream, and I am VERY happy with it, I have to agree with axxackall. I also think it wouldn't hurt to have an lcd interface to the keyboard, so that one could see what layout and interface they are working with. Plus the keyboard would be easier to use at night. And you could theme it (I hate black and red)

I think those keyboards would be worth half the price.

That being said, Once you get used to zero-force typing on a tented surface, you can almost not go back. I HATE other keyboards now. I also am far too lazy to reach for the mouse or other things, since the gestures work so well. The mouse and tablet are only good for artistic purposes now. The keyboard is definately a must have. I got mine used, so I paid a little 2/3 the cost, but I still found it a bit much. Though I feel like I'm getting the price out of it.

Oh, and they don't work on PA-RISC machines for some reason. But yeah, mac, pc, sun, etc all seem to work. Haven't tried SGI get though
Back to top
View user's profile Send private message
taxilian
n00b
n00b


Joined: 11 Jul 2003
Posts: 16
Location: UT, USA

PostPosted: Wed Nov 10, 2004 8:42 pm    Post subject: Reply with quote

Here is a simple init script that I made to start and stop the lineakd daemon, to do it the more "gentoo" way. it's my first successful init script of it's type... I'm very proud of myself =]

just drop the code into /etc/init.d/lineakd
Code:

#!/sbin/runscript

start() {

   ebegin "Starting lineakd"

   start-stop-daemon --start -q -b -m -p /var/run/lineakd.pid --exec /usr/bin/lineakd

   eend $?

}

stop() {

   ebegin "Stopping lineakd"

   start-stop-daemon --stop -q -p /var/run/lineakd.pid

   eend $?

}

_________________
Richard
"Light a man a fire and you warm him for a day. Light a man on fire and he'll be warm for the rest of his life."
Back to top
View user's profile Send private message
dkure
n00b
n00b


Joined: 20 Apr 2004
Posts: 51
Location: Sydney, Australia

PostPosted: Thu Nov 11, 2004 12:42 pm    Post subject: Reply with quote

You should add a restart into the init script, always good to have that one, can be rather usefull if configs are changed etc.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum