diff options
author | Bryan Harris <bryanlharris@gmail.com> | 2010-05-13 01:00:44 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 01:00:44 +0200 |
commit | e4fbc400eabcb6954f369c4292e4ee5e77209c02 (patch) | |
tree | 7739aa2bce7a367f696a42282b551dc061050053 | |
parent | cf8a43d527c17d7ff0a04bc6e6554c420c82751c (diff) | |
download | slackbuilds-e4fbc400eabcb6954f369c4292e4ee5e77209c02.tar.gz |
system/crikey: Added to 13.0 repository
-rw-r--r-- | system/crikey/ChangeLog | 26 | ||||
-rw-r--r-- | system/crikey/NEWS | 21 | ||||
-rw-r--r-- | system/crikey/README | 1 | ||||
-rw-r--r-- | system/crikey/README.source | 67 | ||||
-rw-r--r-- | system/crikey/crikey-0.8.3-Makefile.diff | 33 | ||||
-rw-r--r-- | system/crikey/crikey.SlackBuild | 85 | ||||
-rw-r--r-- | system/crikey/crikey.info | 10 | ||||
-rw-r--r-- | system/crikey/slack-desc | 19 |
8 files changed, 262 insertions, 0 deletions
diff --git a/system/crikey/ChangeLog b/system/crikey/ChangeLog new file mode 100644 index 0000000000..0fc5140374 --- /dev/null +++ b/system/crikey/ChangeLog @@ -0,0 +1,26 @@ +Crikey Change Log: + +0.8.3, August 19 2009: + New ways of specifying characters; make -t the default; add -x and -l arguments; bugfixes. +0.8.2, June 15 2009: + Add -lXext to the link line, needed on some systems. +0.8.1, May 12 2009: + Fix fgets warning that got introduced from the latest stdio.h. +0.8, Jan 13 2009: + Add ^ and \(\) methods of specifying keys. Add BackSpace and Delete. +pykey 0.1, May 25 2008: + New experimental Python version. +0.7, May 25 2008: + Fix XTest (-t) code to send the needed KeyRelease and Shift Press/Release events. +0.6, May 12 2008: + From Glen Smith: Fix special characters that weren't working: % " < +0.5, Nov 9 2004: + From Efraim Feinstein: Add -i option (read from stdin) and -d (print debug output); add "make uninstall" target. +0.4, Mar 27 2004: + Make X events default instead of XTest. Add -s1 syntax as well as -s 1. +0.3: + Add XSendEvent support; code cleanup. +0.2: + Add -s option. +dookey: + First release, called "dookey". diff --git a/system/crikey/NEWS b/system/crikey/NEWS new file mode 100644 index 0000000000..6022c169ef --- /dev/null +++ b/system/crikey/NEWS @@ -0,0 +1,21 @@ +New in 0.8: I've added symbols for BackSpace and Delete. But +more important, I've added two new ways to specify characters. + +You can specify characters by symbol using \( and \), using +the symbol definitions from /usr/include/X11/keysymdef.h. For +example, \(BackSpace\) would insert a backspace character. + +You can also specify control characters using the up-caret ^ +character. So you could get that same backspace character with ^H. + +0.8.1 just fixes a new compiler warning, no functional changes. +0.8.2 adds -lXext to the link line -- some systems added that + automatically, but making it explicit is better. +0.8.3 adds a bunch more new ways to specify characters, fixes + some bugs, and switches back to XTest as the default (use + -x to use XSendEvent). + +I also have a new, experimental, Python version called pykey, +which requires the python-xlib library. It might be useful for +people who don't have a compiler installed, or as a demo of how +to generate key events in python-xlib. Try it out: pykey-0.1. diff --git a/system/crikey/README b/system/crikey/README new file mode 100644 index 0000000000..fe5eb8b736 --- /dev/null +++ b/system/crikey/README @@ -0,0 +1 @@ +Crikey! (Conveniently Repeated Input Key) simulates key events. diff --git a/system/crikey/README.source b/system/crikey/README.source new file mode 100644 index 0000000000..5748191778 --- /dev/null +++ b/system/crikey/README.source @@ -0,0 +1,67 @@ +http://www.shallowsky.com/software/crikey/ + +Usage (command-line flags) +========================== +Usage: crikey [-itxr] [-sS sleeptime] string... +Send key events, as if args was typed in whatever X window currently has focus. +Flags: + -s seconds: sleep time before sending + -S milliseconds: sleep time before sending + Many window managers need a delay for focus shifting + or to allow a modifier button to be released. + -i: Interactive (read input from stdin) + -t: Use XTest to send events (default) + -x: Use XSendEvent to send events + -r: Send events to root window (only with XSendEvent) + -l: Show long (more detailed) help + -d: Show debug messages + +If there are multiple arguments, single spaces will be inserted between them. + + + +Crikey input options +==================== +Sample usage: + +crikey -s 1 'My long string\nExtending over two lines.' + +Using quotes around the string is normally recommended, to avoid problems with +your shell treating any characters specially, especially backslashes. + + +Special characters and syntaxes +=============================== +Control characters use ^: ^A sends a Control-A +Numeric ASCII codes (decimal only): \27 sends ESC + +Special codes: +\t tab, \b backspace, \n newline, \r return, \d delete, \e escape, \\ backslash + +Modifier keys: +\S shift, \C control, \A alt, \M or \W for the "Windows" key. These must be +capitalized, and they only apply to the next single character, so \Aabc will +send alt-A followed by b and c with no modifier keys. + +Special symbols with \( \): \(Return\) ... these are defined in +/usr/include/X11/keysymdef.h, but only those defined on your keyboard will +likely work. + + +A Note on Xterm +=============== +Crikey will work out of the box for most terminal emulators, but xterm blocks +events generated with XSendEvent by default. To use crikey with xterm, you have +two options: + + * Use crikey -t, to use the X Test extension instead of XSendEvent (this is now the default). + * Add to your .Xdefaults file: XTerm*allowSendEvents: true + +Setting up Crikey in your Window Manager + +The most common way to use Crikey is to bind specific crikey commands to keys +in your window manager (for instance, Shift-F12 might send a particular string). + +The procedure for making key bindings is different in every window manager, +so I've moved the instructions for all the various window managers to a separate +page: Making Crikey! work on various window managers. diff --git a/system/crikey/crikey-0.8.3-Makefile.diff b/system/crikey/crikey-0.8.3-Makefile.diff new file mode 100644 index 0000000000..28e70ec984 --- /dev/null +++ b/system/crikey/crikey-0.8.3-Makefile.diff @@ -0,0 +1,33 @@ +diff -Nur crikey-0.8.3.orig/Makefile crikey-0.8.3/Makefile +--- crikey-0.8.3.orig/Makefile 2009-06-15 18:14:05.000000000 -0500 ++++ crikey-0.8.3/Makefile 2009-10-18 00:59:26.654268333 -0500 +@@ -1,8 +1,13 @@ + CC = gcc +-CFLAGS = -Wall -Wstrict-prototypes -g -O2 ++OPTS = -O2 ++CFLAGS = -Wall -Wstrict-prototypes -g $(OPTS) + SRC = crikey.c + OBJ = $(SRC:.c=.o) +-LIBS = -L/usr/X11R6/lib -lX11 -lXtst -lXext ++X11LIBS = /usr/X11R6/lib ++LIBS = -L$(X11LIBS) -lX11 -lXtst -lXext ++PREFIX = /usr/local ++BINDIR = $(PREFIX)/bin ++DESTDIR = + + all: crikey + +@@ -10,10 +15,11 @@ + $(CC) -o crikey $(OBJ) $(LIBS) + + install: crikey +- cp crikey /usr/local/bin ++ mkdir -p $(DESTDIR)/$(BINDIR) ++ cp crikey $(DESTDIR)/$(BINDIR) + + uninstall: +- rm -f /usr/local/bin/crikey ++ rm -f $(DESTDIR)/$(BINDIR)/crikey + + clean: + rm -f $(OBJ) crikey *~ diff --git a/system/crikey/crikey.SlackBuild b/system/crikey/crikey.SlackBuild new file mode 100644 index 0000000000..b2a0a0f6df --- /dev/null +++ b/system/crikey/crikey.SlackBuild @@ -0,0 +1,85 @@ +#!/bin/sh + +# Slackware build script for crikey + +# Copyright 2009 Bryan Harris, Texas, United States +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=crikey +VERSION=${VERSION:-0.8.3} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Let's make packaging a bit easier (patch sent upstream by RW) +patch -p1 < $CWD/crikey-0.8.3-Makefile.diff + +make install \ + OPTS="$SLKCFLAGS" \ + PREFIX=/usr \ + X11LIBS=/usr/lib${LIBDIRSUFFIX}/X11 \ + DESTDIR=$PKG + +strip --strip-unneeded $PKG/usr/bin/crikey + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/ChangeLog > $PKG/usr/doc/$PRGNAM-$VERSION/ChangeLog +cat $CWD/NEWS > $PKG/usr/doc/$PRGNAM-$VERSION/NEWS +cat $CWD/README.source > $PKG/usr/doc/$PRGNAM-$VERSION/README +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/crikey/crikey.info b/system/crikey/crikey.info new file mode 100644 index 0000000000..32997a9d7c --- /dev/null +++ b/system/crikey/crikey.info @@ -0,0 +1,10 @@ +PRGNAM="crikey" +VERSION="0.8.3" +HOMEPAGE="http://www.shallowsky.com/software/crikey/" +DOWNLOAD="http://www.shallowsky.com/software/crikey/crikey-0.8.3.tar.gz" +MD5SUM="e0e791fe9a4a4183ebebf9c38b91c8a2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Bryan Harris" +EMAIL="bryanlharris@gmail.com" +APPROVED="rworkman" diff --git a/system/crikey/slack-desc b/system/crikey/slack-desc new file mode 100644 index 0000000000..c8efe0afba --- /dev/null +++ b/system/crikey/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +crikey: crikey (Conveniently Repeated Input Key) +crikey: +crikey: crikey is a little program that simulates key events. +crikey: It gives the ability to assign a key shortcut to a string. +crikey: For example, store your username on F1 and then use it +crikey: quickly in any application. +crikey: +crikey: Homepage: http://www.shallowsky.com/software/crikey/ +crikey: +crikey: +crikey: |