Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455992 - x11-misc/xcape - utility to make control key send escape key events when pressed on its own
Summary: x11-misc/xcape - utility to make control key send escape key events when pres...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: aditsu
URL: https://github.com/alols/xcape
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2013-02-07 12:02 UTC by aditsu
Modified: 2013-03-10 08:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed ebuild (ksuperkey-9999.ebuild,315 bytes, text/plain)
2013-02-07 12:03 UTC, aditsu
Details
xcape ebuild (xcape-9999.ebuild,313 bytes, text/plain)
2013-02-08 03:29 UTC, aditsu
Details
xcape-1.0.ebuild (xcape-1.0.ebuild,536 bytes, text/plain)
2013-03-07 16:47 UTC, aditsu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aditsu 2013-02-07 12:02:13 UTC
I found this program called ksuperkey that enables me to use the super (windows) key on its own in X, without losing its usage as a modifier. It appears to have been written for kde, and I am using it in kde, but the code doesn't seem to rely on anything from kde.
I couldn't find ksuperkey in portage nor sunrise, so I wrote a very simple ebuild for it. It works, but look out for beginner mistakes.

Reproducible: Always
Comment 1 aditsu 2013-02-07 12:03:02 UTC
Created attachment 338218 [details]
proposed ebuild
Comment 2 Sergey Popov gentoo-dev 2013-02-07 14:37:00 UTC
Hm, maybe it would be better to bring xcape to portage?
https://github.com/alols/xcape

I do not see fundamental differences in this programs(ksuperkey is a fork of xcape and does not depends on KDE), but xcape upstream seems more active...
Comment 3 aditsu 2013-02-07 14:53:18 UTC
Good point.
I hadn't thought about it before, but I've just compared the source code now and the main difference is the default mapping. I'm using a different mapping anyway, because I always use ctrl+esc for the application launcher (like in windows).
So I think it makes sense to add xcape directly.
Comment 4 Sergey Popov gentoo-dev 2013-02-07 16:20:53 UTC
Ok, renaming bug and removing kde team from CC
Comment 5 aditsu 2013-02-08 03:29:34 UTC
Created attachment 338282 [details]
xcape ebuild
Comment 6 aditsu 2013-02-08 03:44:44 UTC
What's the next step? Are we looking for a maintainer? Can I do it? Should I try to add it to sunrise first?
Comment 7 Sergey Popov gentoo-dev 2013-03-07 08:36:18 UTC
(In reply to comment #5)
> Created attachment 338282 [details]
> xcape ebuild

Comments on the ebuild:

- missing headers, please take it from /usr/portage/skel.ebuild;
- use latest EAPI, if possible;
- we prefer ebuilds for releases, unless there is some critical fixes in repository was made. Upstream tagged version 1.0 for xcape;
- keywords must be unstable(~amd64 in your case);
- build-time dependency(but not runtime!) should include virtual/pkgconfig, cause it's used by package's buildsystem.

That's what about ebuild syntax. Now about build process:

>>> Compiling source in /home/tmp/portage/x11-misc/xcape-9999/work/xcape-9999 ...
make -j11 
cc -Os -pipe -march=core2 -Wall `pkg-config --cflags xtst x11` -o xcape xcape.c -Wl,-O1 -Wl,--as-needed `pkg-config --libs xtst x11` -pthread
xcape.c: In function 'main':
xcape.c:160:16: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]

Compiler does not respected - ebuild should never use cc or gcc, but full defined compiler binary(x86_64-pc-linux-gnu-gcc instead on amd64 system, for example). Use toolchain-funcs eclass for overriding compiler.

For more information on ebuild writing, please refer to Gentoo Development Guide(http://devmanual.gentoo.org/)
Comment 8 aditsu 2013-03-07 16:47:32 UTC
Created attachment 341242 [details]
xcape-1.0.ebuild

Thanks for your reply, here's the updated ebuild. Let me know if it has any problems.
I also have a couple of questions:
- Should I add ~x86 even if I didn't test on that arch (but I expect it to work)?
- Can we still have a (maybe masked) version that gets the latest code from the repository, e.g. like udev?
Comment 9 Sergey Popov gentoo-dev 2013-03-10 08:51:43 UTC
+  10 Mar 2013; Sergey Popov <pinkbyte@gentoo.org> +xcape-1.0.ebuild,
+  +metadata.xml:
+  Initial commit, wrt bug #455992. Ebuild by aditsu <aditsu AT yahoo.com>, he
+  will maintain this package through proxy maintainers