Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Announcement: scriptable linux USB keymapper available
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Lars Krueger  
View profile  
 More options Mar 30 2007, 8:41 am
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Fri, 30 Mar 2007 14:41:24 +0200
Local: Fri, Mar 30 2007 8:41 am
Subject: Announcement: scriptable linux USB keymapper available
Hi everyone,

finally I completed the first version of USBHOTKEY, a small utility that allows you to implement a script similar to autohotkey, just under Linux/X11.

Check out

usbhotkey.sf.net

In case of any problems, contact me via email.

May you find this helpful,
--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daryl Stultz  
View profile  
 More options Mar 30 2007, 12:50 pm
From: "Daryl Stultz" <kungfumachin...@gmail.com>
Date: Fri, 30 Mar 2007 16:50:52 -0000
Local: Fri, Mar 30 2007 12:50 pm
Subject: Re: Announcement: scriptable linux USB keymapper available

> finally I completed the first version of USBHOTKEY, a small utility that allows you to implement a script similar to autohotkey, just under Linux/X11.

Looks good, Lars, I'm excited about working with it. Unfortunately I
haven't had a lot of success compiling software. It rarely works for
me. I got the SVN sources for libhid and it configured but failed
miserably to compile. I can't find an RPM for it. Any idea why I might
get stuff like this? Thanks.

hid_wrap.c:2642: error: conflicting types for 'arg5'
hid_wrap.c:2593: error: previous declaration of 'arg5' was here
hid_wrap.c:2642: error: initializer element is not constant
hid_wrap.c:2642: warning: data definition has no type or storage class
hid_wrap.c:2643: error: syntax error before '}' token
hid_wrap.c:2644: warning: type defaults to 'int' in declaration of
'result'
hid_wrap.c:2644: error: conflicting types for 'result'
hid_wrap.c:2594: error: previous declaration of 'result' was here
hid_wrap.c:2644: error: initializer element is not constant
hid_wrap.c:2644: warning: data definition has no type or storage class
hid_wrap.c:2646: warning: type defaults to 'int' in declaration of
'resultobj'
hid_wrap.c:2646: error: redefinition of 'resultobj'
hid_wrap.c:1828: error: previous definition of 'resultobj' was here
hid_wrap.c:2646: error: initializer element is not constant
hid_wrap.c:2646: warning: data definition has no type or storage class
hid_wrap.c:2647: error: syntax error before '{' token
hid_wrap.c:2659: error: syntax error before '*' token
hid_wrap.c:2659: error: syntax error before '*' token
hid_wrap.c:2661: error: redefinition of 'arg1'


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Mar 30 2007, 1:30 pm
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Fri, 30 Mar 2007 19:30:18 +0200
Local: Fri, Mar 30 2007 1:30 pm
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available

> Looks good, Lars, I'm excited about working with it. Unfortunately I
> haven't had a lot of success compiling software. It rarely works for
> me. I got the SVN sources for libhid and it configured but failed
> miserably to compile. I can't find an RPM for it. Any idea why I might
> get stuff like this? Thanks.

> hid_wrap.c:2642: error: conflicting types for 'arg5'

This is caused by the python wrapper. I guess you don't have python installed (like me, I get the same errors).

Try:

./configure --disable-swig
make

It worked for me, for both the svn version and the tgz version. I put that hint in the README for the next release
--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daryl Stultz  
View profile  
 More options Mar 30 2007, 2:54 pm
From: "Daryl Stultz" <kungfumachin...@gmail.com>
Date: Fri, 30 Mar 2007 18:54:48 -0000
Local: Fri, Mar 30 2007 2:54 pm
Subject: Re: Announcement: scriptable linux USB keymapper available
> This is caused by the python wrapper. I guess you don't have python installed (like me, I get the same errors).

That's odd, I definitely have python... maybe I don't have dev
headers?

> Try:

> ./configure --disable-swig
> make

Yup, that works, thanks. Now to configure usbhotkey... it says it
can't find libhid (which I just compiled and installed). How do I
specify its location (/opt/libhid)? Thanks.

-Daryl


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Mar 30 2007, 4:27 pm
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Fri, 30 Mar 2007 22:27:44 +0200
Local: Fri, Mar 30 2007 4:27 pm
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available

> Yup, that works, thanks. Now to configure usbhotkey... it says it
> can't find libhid (which I just compiled and installed). How do I
> specify its location (/opt/libhid)? Thanks.

Try
LDFLAGS="-L/opt/libhid" ./configure

Maybe you need
LDFLAGS="-L/opt/libhid" CFLAGS="-I/opt/libhid" ./configure

Maybe you need to do that for make too.

--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daryl Stultz  
View profile  
 More options Mar 30 2007, 4:46 pm
From: "Daryl Stultz" <kungfumachin...@gmail.com>
Date: Fri, 30 Mar 2007 20:46:53 -0000
Local: Fri, Mar 30 2007 4:46 pm
Subject: Re: Announcement: scriptable linux USB keymapper available

On Mar 30, 4:27 pm, "Lars Krueger" <lars_e_krue...@gmx.de> wrote:

> Try
> LDFLAGS="-L/opt/libhid" ./configure

> Maybe you need
> LDFLAGS="-L/opt/libhid" CFLAGS="-I/opt/libhid" ./configure

No, that didn't work. I recompiled libhid without specifying prefix
and that worked (usbhotkey configure found it). Now it can't find
imlib. I installed imlib-devel and that worked. For fun I installed
ruby-devel, too. Now it configures OK but doesn't compile. Here's the
entire make response:

make  all-recursive
make[1]: Entering directory `/opt/downloads/usbhotkey-0.1'
Making all in images
make[2]: Entering directory `/opt/downloads/usbhotkey-0.1/images'
Making all in ag5
make[3]: Entering directory `/opt/downloads/usbhotkey-0.1/images/ag5'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/opt/downloads/usbhotkey-0.1/images/ag5'
make[3]: Entering directory `/opt/downloads/usbhotkey-0.1/images'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/opt/downloads/usbhotkey-0.1/images'
make[2]: Leaving directory `/opt/downloads/usbhotkey-0.1/images'
make[2]: Entering directory `/opt/downloads/usbhotkey-0.1'
gcc -DHAVE_CONFIG_H -I. "-I/usr/lib/ruby/1.8/i386-linux"    -g -O2 -MT
main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc  -g -O2   -o usbhotkey main.o  -lXtst -lImlib -lhid -lruby
/usr/bin/ld: cannot find -lXtst
collect2: ld returned 1 exit status
make[2]: *** [usbhotkey] Error 1
make[2]: Leaving directory `/opt/downloads/usbhotkey-0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/downloads/usbhotkey-0.1'
make: *** [all] Error 2

I'm going out of town this weekend, so I'll be back on this Sunday or
Monday. Thanks for your help, Lars.

-Daryl


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daryl Stultz  
View profile  
 More options Mar 30 2007, 7:55 pm
From: "Daryl Stultz" <kungfumachin...@gmail.com>
Date: Fri, 30 Mar 2007 23:55:11 -0000
Local: Fri, Mar 30 2007 7:55 pm
Subject: Re: Announcement: scriptable linux USB keymapper available
On Mar 30, 4:46 pm, "Daryl Stultz" <kungfumachin...@gmail.com> wrote:

> I'm going out of town this weekend,

Well I got a chance to work on it at home. I compiled and installed
everything but it fails to run with:

error while loading shared libraries: libhid.so.0: cannot open shared
object file: No such file or directory

I have libhid installed at

/usr/local/lib/libhid.so

Can I specify the location of libhid as a parameter to usbhotkey? (I
apologize for my ignorance, I develop in Java...)

-Daryl


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Sun  
View profile  
 More options Mar 31 2007, 3:03 am
From: "Bill Sun" <billk...@gmail.com>
Date: Sat, 31 Mar 2007 00:03:35 -0700
Local: Sat, Mar 31 2007 3:03 am
Subject: Re: Announcement: scriptable linux USB keymapper available
So, I got usbhotkey installed.  However I encountered this error when
running it (had to use sudo):

usb_set_debug: Setting debugging level to 1000 (on)
usbhotkey: Loading script /usr/local/share/usbhotkey-0.1/ag5.rb
usbhotkey AG5 script starting
usbhotkey: Connecting to 0510:100b
Check that you have permissions to write to 002/001 and, if you don't,
that you set up hotplug (http://linux-hotplug.sourceforge.net/)
correctly.
USB error: could not claim interface 0: Device or resource busy
usbhotkey AG5 script started
usbhotkey: Starting event loop

I've checked my AG5's info via lsusb -vvv, and the information match
those in the script, so it should be connecting to the correct
device.  What else can cause this error?  I've setup Xorg to use evdev
for the AG5's mouse, could this be the culprit (although the mouse is
on a different end-point)?

-Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Mar 31 2007, 7:12 am
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Sat, 31 Mar 2007 13:12:56 +0200
Local: Sat, Mar 31 2007 7:12 am
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available
> /usr/local/lib/libhid.so

I guess you forget to run

ldconfig

Do it as root. It scans your installed libraries and makes a cache file to find them later on.

To your other question: The error
can't find -lXtst

means that you don't have the X test extension installed. Your distribution should provide a package containing it. If not, check the forum/howto pages of your distribution.
--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Mar 31 2007, 7:19 am
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Sat, 31 Mar 2007 13:19:13 +0200
Local: Sat, Mar 31 2007 7:19 am
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available

> usb_set_debug: Setting debugging level to 1000 (on)
> usbhotkey: Loading script /usr/local/share/usbhotkey-0.1/ag5.rb
> usbhotkey AG5 script starting
> usbhotkey: Connecting to 0510:100b
> Check that you have permissions to write to 002/001 and, if you don't,
> that you set up hotplug (http://linux-hotplug.sourceforge.net/)
> correctly.

This is a bogus error message of libhid. It basically means you can't access a part of your USB tree from your current user. If it gets past this message it also means that you don't actually need to access it.

> USB error: could not claim interface 0: Device or resource busy

Again, bogus message. Some device (I think it's the hub in the AG5) can't be opened.

> usbhotkey AG5 script started
> usbhotkey: Starting event loop

This is the important message here. If you get this far, everything works and you can pass events to X11. You should see the keymap display in the lower right of your screen.

I'll put a note about this in the README.
--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Sun  
View profile  
 More options Mar 31 2007, 5:13 pm
From: "Bill Sun" <billk...@gmail.com>
Date: Sat, 31 Mar 2007 14:13:55 -0700
Local: Sat, Mar 31 2007 5:13 pm
Subject: Re: Announcement: scriptable linux USB keymapper available

> This is the important message here. If you get this far, everything works and you can pass events to X11. You should see the keymap display in the lower right of your screen.

Ah, I did notice something on the lower right corner of my screen, but
it appears that the images cannot load correctly, I get blank, white
buttons instead of the png images.  The Ruby code point to the correct
paths so I'm not quite sure what's wrong.  After trying to type this
message using my AG5, I also noticed that the bindings worked, so
everything seems fine except for the button layout image display.

-Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Apr 1 2007, 2:47 am
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Sun, 01 Apr 2007 08:47:24 +0200
Local: Sun, Apr 1 2007 2:47 am
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available

> The Ruby code point to the correct
> paths so I'm not quite sure what's wrong.

Ca'nt help you there. I copied the code from xteddy. Maybe your imlib does not have png support. You may try to change the filenames and convert to, say, JPG.
--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Sun  
View profile  
 More options Apr 1 2007, 4:35 pm
From: "Bill Sun" <billk...@gmail.com>
Date: Sun, 01 Apr 2007 13:35:53 -0700
Local: Sun, Apr 1 2007 4:35 pm
Subject: Re: Announcement: scriptable linux USB keymapper available
Lars,

I just found out via Ubuntu 6.10's package repository, that there's
imlib2 and there are already ruby extensions written for it as well.
Is there any reason not to use imlib2?  Considering that it's possible
to install the imlib2 dependency via a ruby gem, this can simplify the
installation procedure a bit.

-Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Sun  
View profile  
 More options Apr 1 2007, 4:44 pm
From: "Bill Sun" <billk...@gmail.com>
Date: Sun, 01 Apr 2007 13:44:05 -0700
Local: Sun, Apr 1 2007 4:44 pm
Subject: Re: Announcement: scriptable linux USB keymapper available

>Considering that it's possible to install the imlib2 dependency via a ruby gem

Sorry, I meant, "imlib2-ruby" dependency.

-Bill


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daryl Stultz  
View profile  
 More options Apr 2 2007, 10:28 am
From: "Daryl Stultz" <kungfumachin...@gmail.com>
Date: Mon, 02 Apr 2007 14:28:30 -0000
Local: Mon, Apr 2 2007 10:28 am
Subject: Re: Announcement: scriptable linux USB keymapper available

> I guess you forget to run
> ldconfig

Can't say I "forgot" since I never knew... anyway, I tried it and it
didn't work. Maybe I'll go back to try to compile libhid with swig so
I can code in Python. Perhaps I'll have to wait 'til libhid comes out
in RPM (followed shortly by usbhotkey.rpm :-) )

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lars Krueger  
View profile  
 More options Apr 2 2007, 11:57 am
From: "Lars Krueger" <lars_e_krue...@gmx.de>
Date: Mon, 02 Apr 2007 17:57:16 +0200
Local: Mon, Apr 2 2007 11:57 am
Subject: Re: [alphagrip] Re: Announcement: scriptable linux USB keymapper available

> >Considering that it's possible to install the imlib2 dependency via a
> ruby gem

Since the image display codes from xteddy (displays a cuddly teddy bear on your screen, nothing else), you might try to install it and maybe imlib is installed automatically.

--
Lars Krueger
http://LarsKrueger.homestead.com/files
mailto:lars_e_krue...@gmx.de

"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Sun  
View profile  
 More options Apr 2 2007, 12:18 pm
From: "Bill Sun" <billk...@gmail.com>
Date: Mon, 02 Apr 2007 09:18:05 -0700
Local: Mon, Apr 2 2007 12:18 pm
Subject: Re: Announcement: scriptable linux USB keymapper available

> Since the image display codes from xteddy (displays a cuddly teddy bear on your screen, nothing else), you might try to install it and maybe imlib is installed automatically.

I do have imlib installed from the package repository, I'm just
wondering why isn't imlib2 used instead, since that is suppose to
supersede imlib.  Plus there's already ruby extensions written for
imlib2 so you don't need to write and compile your own (even though
you're only using a few functions).

I still haven't figure out why my imlib won't load the images
correctly (the transparent part works, but the opaque part only comes
in white.  I've tried using jpeg and I just get a white box), I'll dig
in some more when I get the time.

I'm also thinking about moving the key bindings map to a YAML file, as
Ruby have excellent support for YAML (http://yaml4r.sourceforge.net/),
and YAML is also much more readable than XML.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google