Sponsored Content
Operating Systems Linux Making CapsLock a Unique Modifier Post 302447574 by lawschool121 on Monday 23rd of August 2010 03:11:12 PM
Old 08-23-2010
Making CapsLock a Unique Modifier

I would like to use Caps Lock as its own UNIQUE modifier key (not merely replace it with Ctrl). I have figured out how to do this on windows but not yet in Ubuntu. Here is what I'm looking for:

1. When I press "Caps Lock" on its own, it is equivalent to the Escape key (or at least sends the "escape" command).
2. When I press Caps Lock + <new key>, it does other stuff.

I have figured out how to get EITHER ONE of these to work, but not both at the same time. For example, I have figured out how to turn Caps Lock into the unique "Super" modifier using xbindkeys and xmacro (this achieves #2). I have also figured out how to switch the escape and capslocks keys altogether to achieve #1. But I can't figure out how to get both outcomes at the same time!

Any advice?
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: Getting back reference from s modifier

My input text has the following pattens: func_a(3, 4, 5); I want to replace it with this: func_b(3, 4, 5, 6); I'm trying the following expression, but it does not work: perl -p -e "s/func_a\((.*)?\);/func_b(\1,\n6)/s" <... (8 Replies)
Discussion started by: cooldude
8 Replies

2. UNIX for Dummies Questions & Answers

convert column into row with some modifier

A file content have 1 1:-0.289433 2:0.833778 3:0.314471 4:-0.289433 5:-0.81876 6:-0.456693 7:-0.17511 8:-0.644555 9:-0.00666341 10:-1.13603 I will like to have that column into row with numbers to be printed (red color) only after colon output shud be like that -0.289433... (1 Reply)
Discussion started by: cdfd123
1 Replies

3. Shell Programming and Scripting

get part of file with unique & non-unique string

I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM". I can find the line number for the beginning of the statement section with sed. ... (5 Replies)
Discussion started by: andrewsc
5 Replies

4. Solaris

Tar too large to archive. Use E function modifier.

hey all, i am trying to tar up a folder with sub folders the over all size will be about 70gb but when i use the normal command tar -cvf tar -cvf CLPSI_PRU_Escrow_31994.tar CLPSI_PRU_Escrow_31994 i get an error tar: CLPSI_PRU_Escrow_31994/dump1/PROD_SAE_jria3_dump.5 too large to archive. ... (9 Replies)
Discussion started by: dshakey
9 Replies

5. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

6. UNIX for Dummies Questions & Answers

Print unique lines without sort or unique

I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Discussion started by: cokedude
7 Replies

7. UNIX for Dummies Questions & Answers

Capslock and Python Question

Hello All, I was looking for a solution for enabling/disabling the Capslock from the command line and came across some Python code for doing just that... Well, in this case the code was written to ONLY turn-off Capslock but I assume there has to be a way to turn it on too. Site where I... (0 Replies)
Discussion started by: mrm5102
0 Replies
XkbKeyTypesForCoreSymbols(3)					   XKB FUNCTIONS				      XkbKeyTypesForCoreSymbols(3)

NAME
XkbKeyTypesForCoreSymbols - Determine the Xkb key types appropriate for the symbols bound to a key in a core keyboard mapping SYNOPSIS
int XkbKeyTypesForCoreSymbols (XkbDescPtr xkb, int map_width, KeySym *core_syms, unsigned int protected, int *types_inout, KeySym *xkb_syms_rtrn); ARGUMENTS
- xkb keyboard description in which to place symbols - map_width width of core protocol keymap in xkb_syms_rtrn - core_syms core protocol format array of KeySyms - protected explicit key types - types_inout backfilled with the canonical types bound to groups one and two for the key - xkb_syms_rtrn backfilled with symbols bound to the key in the Xkb mapping DESCRIPTION
XkbKeyTypesForCoreSymbols expands the symbols in core_syms and types in types_inout, then chooses canonical key types (canonical key types are defined The Canonical Key Types) for groups 1 and 2 using the rules specified by the Xkb protocol and places them in xkb_syms_rtrn, which will be non-NULL. The Canonical Key Types Xkb allows up to XkbMaxKeyTypes (255) key types to be defined, but requires at least XkbNumRequiredTypes (4) predefined types to be in a key map. These predefined key types are referred to as the canonical key types and describe the types of keys available on most keyboards. The definitions for the canonical key types are held in the first XkbNumRequiredTypes entries of the types field of the client map and are indexed using the following constants: XkbOneLevelIndex XkbTwoLevelIndex XkbAlphabeticIndex XkbKeypadIndex ONE_LEVEL The ONE_LEVEL key type describes groups that have only one symbol. The default ONE_LEVEL key type has no map entries and does not pay attention to any modifiers. A symbolic representation of this key type could look like the following: type "ONE_LEVEL" { modifiers = None; map[None]= Level1; level_name[Level1]= "Any"; }; The description of the ONE_LEVEL key type is stored in the types[XkbOneLevelIndex] entry of the client key map. TWO_LEVEL The TWO_LEVEL key type describes groups that consist of two symbols but are neither alphabetic nor numeric keypad keys. The default TWO_LEVEL type uses only the Shift modifier. It returns shift level two if Shift is set, and level one if it is not. A symbolic representa- tion of this key type could look like the following: type "TWO_LEVEL" { modifiers = Shift; map[Shift]= Level2; level_name[Level1]= "Base"; level_name[Level2]= "Shift"; }; The description of the TWO_LEVEL key type is stored in the types[XkbTwoLevelIndex] entry of the client key map. ALPHABETIC The ALPHABETIC key type describes groups consisting of two symbols: the lowercase form of a symbol followed by the uppercase form of the same symbol. The default ALPHABETIC type implements locale-sensitive "Shift cancels CapsLock" behavior using both the Shift and Lock modi- fiers as follows: o If Shift and Lock are both set, the default ALPHABETIC type yields level one. o If Shift alone is set, it yields level two. o If Lock alone is set, it yields level one, but preserves the Lock modifier so Xlib notices and applies the appropriate capitalization rules. The Xlib functions are locale-sensitive and apply different capitalization rules for different locales. o If neither Shift nor Lock is set, it yields level one. A symbolic representation of this key type could look like the following: type "ALPHABETIC" { modifiers = Shift+Lock; map[Shift]= Level2; preserve[Lock]= Lock; level_name[Level1]= "Base"; level_name[Level2]= "Caps"; }; The description of the ALPHABETIC key type is stored in the types[XkbAlphabeticIndex] entry of the client key map. KEYPAD The KEYPAD key type describes groups that consist of two symbols, at least one of which is a numeric keypad symbol. The numeric keypad symbol is assumed to reside at level two. The default KEYPAD key type implements "Shift cancels NumLock" behavior using the Shift mod- ifier and the real modifier bound to the virtual modifier named "NumLock," known as the NumLock modifier, as follows: o If Shift and NumLock are both set, the default KEYPAD type yields level one. o If Shift alone is set, it yields level two. o If NumLock alone is set, it yields level two. o If neither Shift nor NumLock is set, it yields level one. A symbolic representation of this key type could look like the following: type "KEYPAD" { modifiers = Shift+NumLock; map[None]= Level1; map[Shift]= Level2; map[NumLock]= Level2; map[Shift+NumLock]= Level1; level_name[Level1]= "Base"; level_name[Level2]= "Caps"; }; The description of the KEYPAD key type is stored in the types[XkbKeypadIndex] entry of the client key map. A core keymap is a two-dimensional array of keysyms. It has map_width columns and max_key_code rows. XkbKeyTypesForCoreSymbols takes a single row from a core keymap, determines the number of groups associated with it, the type of each group, and the symbols bound to each group. The return value is the number of groups, types_inout has the types for each group, and xkb_syms_rtrn has the symbols in Xkb order (that is, groups are contiguous, regardless of size). protected contains the explicitly protected key types. There is one explicit override control associated with each of the four possi- ble groups for each Xkb key, ExplicitKeyType1 through ExplicitKeyType4; protected is an inclusive OR of these controls. map_width is the width of the core keymap and is not dependent on any Xkb definitions. types_inout is an array of four type indices. On input, types_inout contains the indices of any types already assigned to the key, in case they are explicitly protected from change. Upon return, types_inout contains any automatically selected (that is, canonical) types plus any protected types. Canonical types are assigned to all four groups if there are enough symbols to do so. The four entries in types_inout correspond to the four groups for the key in question. X Version 11 libX11 1.3.2 XkbKeyTypesForCoreSymbols(3)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy