You are not logged in.

#1 2010-08-24 04:18:35

lawschool121
Member
Registered: 2010-08-24
Posts: 2

How to bind a modifier to an action?

Is there any way to make, say, control send a command like "escape" when pressed a single time IN ADDITION to all of its other functions?  I cannot figure out how to make single pressed modifiers in linux send unique actions.  Any advice?

Offline

#2 2010-08-25 18:48:09

serprex
Member
Registered: 2010-08-04
Posts: 10
Website

Re: How to bind a modifier to an action?

What context are you trying to bind in? WM shortcuts? Xlib? XCB?

Offline

#3 2010-08-25 19:39:52

splittercode
Member
From: WI, USA
Registered: 2010-03-16
Posts: 203

Re: How to bind a modifier to an action?

Just glancing over the xmodmap manual, it appears you can use the keysym option to map the same key to multiple actions.

man xmodmap wrote:

EXAMPLE: xmodmap -e "keysym Alt_L = Meta_L Alt_L"

Offline

#4 2010-08-28 20:21:08

lawschool121
Member
Registered: 2010-08-24
Posts: 2

Re: How to bind a modifier to an action?

The idea is to take a key, say Control, and make it BOTH at the same time:

1. A modifier Key
2. An action key

For example: if I press control a single time, it acts as an escape key by sending the "escape" action.  If I press control + C, it might copy text while not sending an escape command. 

You can certainly do this in windows, but I can't find ANY way to do this in linux!

Offline

Board footer

Powered by FluxBB