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
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 2
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 3
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • 4
    eSpeak: speech synthesis
    eSpeak: speech synthesis
    Text to Speech engine for English and
    many other languages. Compact size with
    clear but artificial pronunciation.
    Available as a command-line program with
    many ...
    Download eSpeak: speech synthesis
  • 5
    Sky Chart / Cartes du Ciel
    Sky Chart / Cartes du Ciel
    SkyChart is a software to draw chart of
    the night sky for the amateur astronomer
    from a bunch of stars and nebulae
    catalogs. See main web page for full
    download...
    Download Sky Chart / Cartes du Ciel
  • 6
    GSmartControl
    GSmartControl
    GSmartControl is a graphical user
    interface for smartctl. It allows you to
    inspect the hard disk and solid-state
    drive SMART data to determine its
    health, as w...
    Download GSmartControl
  • More »

Linux commands

  • 1
    abc2abc
    abc2abc
    abc2abc - a simple abc
    checker/re-formatter/transposer ...
    Run abc2abc
  • 2
    abc2ly
    abc2ly
    abc2ly - manual page for abc2ly
    (LilyPond) 2.18.2 ...
    Run abc2ly
  • 3
    coqmktop
    coqmktop
    coqmktop - The Coq Proof Assistant
    user-tactics linker ...
    Run coqmktop
  • 4
    coqtop
    coqtop
    coqtop - The Coq Proof Assistant
    toplevel system ...
    Run coqtop
  • 5
    g.copygrass
    g.copygrass
    g.copy - Copies available data files in
    the current mapset search path to the
    user�s current mapset. KEYWORDS:
    general, map management ...
    Run g.copygrass
  • 6
    g.dirsepsgrass
    g.dirsepsgrass
    g.dirseps - Internal GRASS utility for
    converting directory separator
    characters. Converts any directory
    separator characters in the input string
    to or from na...
    Run g.dirsepsgrass
  • More »

Ad