EnglishFrenchSpanish

OnWorks favicon

xcape - Online in the Cloud

Run xcape in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command xcape that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


xcape - use a modifier key as another key

SYNOPSIS


xcape [-d] [-t timeout] [-e map-expression]

DESCRIPTION


xcape allows a modifier key to be used as another key when it is pressed and released on
its own. The default behaviour is to generate the Escape key in place of Control_L (Left
Control).

OPTIONS


-d Debug mode. Will run as a foreground process.

-t timeout
Give a timeout in milliseconds. If you hold a key longer than timeout a key event
will not be generated.

-e map-expression
Use map-expression as the expression(s).

EXPRESSION SYNTAX


Expression syntax is ´ModKey=Key[|OtherKey]´. Multiple expressions can be passed,
delimited by semi-colons (;).

A list of keysyms can be found in the header file <X11/keysymdef.h> (without the XK_
prefix).

Note that shifted keys must be specified as a shift key followed by the key to be pressed
rather than the actual name of the character. For example to generate "{" the expression
´ModKey=Shift_L|bracketleft´ could be used (assuming that you have a key with ´{´ above
´[´).

You can also specify ModKey in decimal (prefix #), octal (#0), or hexadecimal (#0x). It
will be interpreted as a keycode unless no corresponding key name is found.

EXAMPLES


Make Left Shift generate Escape when pressed and released on it's own, and Left Control
generate Ctrl-O combination when pressed and released on it's own:
xcape -e 'Shift_L=Escape;Control_L=Control_L|O'

In conjugation with xmodmap it is possible to make an ordinary key act as an extra
modifier. First map the key to the modifier with xmodmap and then the modifier back to the
key with xcape. As an example, we can make the space bar work as an additional ctrl key
when held with the following sequence of commands:

First, map an unused modifier's keysym to the spacebar's keycode and make it a control
modifier. It needs to be an existing key so that emacs won't spazz out when you press it.
Hyper_L is a good candidate.

spare_modifier="Hyper_L"
xmoadmap -e "keycode 65 = $spare_modifier"
xmoadmap -e "remove mod4 = $spare_modifier"
# hyper_l is mod4 by default
xmoadmap -e "add Control = $spare_modifier"

Next, map space to an unused keycode (to keep it around for xcape to use).

xmodmap -e "keycode any = space"

Finally use xcape to cause the space bar to generate a space when tapped.

xcape -e "$spare_modifier=space"

Use xcape online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 2
    usm
    usm
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 3
    Chart.js
    Chart.js
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • 4
    iReport-Designer for JasperReports
    iReport-Designer for JasperReports
    NOTE: iReport/Jaspersoft Studio Support
    Announcement: As of version 5.5.0,
    Jaspersoft Studio will be the official
    design client for JasperReports. iReport
    will...
    Download iReport-Designer for JasperReports
  • 5
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 6
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • More »

Linux commands

Ad