Sponsored Content
Full Discussion: Caps lock dtterm
Operating Systems HP-UX Caps lock dtterm Post 302302579 by mgb on Tuesday 31st of March 2009 10:59:23 AM
Old 03-31-2009
Question

We believe this is an X Server issue. We have been playing with xmodmap, here is the xmodmap on the HP side:

$ xmodmap
xmodmap: up to 2 keys per modifier, (keycodes in parentheses):

shift Shift_R (0xd), Shift_L (0x18)
lock Caps_Lock (0x1c)
control Control_R (0xe), Control_L (0x19)
mod1 Alt_R (0xf), Alt_L (0x12)
mod2
mod3
mod4
mod5

Here is the xmodmap on the Red Hat side:
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Caps_Lock (0x42), Control_R (0x6d), Control_L (0x25)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)

We can change the Caps_Lock to another key or swap it but the problem is having it work on the Caps Lock key. We have tried changing the keycode for lock to the keycode on the HP but that does not work.Smilie

Please help.

Thanks,

mgb
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

protect dtterm

we have an hp-ux and a user requested me if i can password protect the dtterm. i know that this is possible but can you give me some hints in making this happen? thanks :cool: (2 Replies)
Discussion started by: inquirer
2 Replies

2. UNIX for Dummies Questions & Answers

activating ./dtterm

Working of a Aix 4.3 (using ksh) Have started dtlogin daemon . < root 26376 1 0 14:07:19 - 0:08 ./dtlogin -daemon > Have set dtconfig -e < The CDE environment is Already set as the default User Interface. > Have executed " export DISPLAY=10.1.187.86:0.0 Once all this is... (4 Replies)
Discussion started by: buRst
4 Replies

3. Red Hat

Caps lock dtterm

Hello, We are having a problem with running dtterm off a RHEL server. Logging into an HP-UX server from a RHEL 5.1 desktop, setting DISPLAY and running dtterm, the caps lock does not work. We have been playing with xmodmap & stty but to no avail. Any help appreciated. mgb (1 Reply)
Discussion started by: mgb
1 Replies

4. UNIX for Advanced & Expert Users

Set Caps and Num lock from within X?

Hello, Not sure if this is the right place to post it but.. I have a requirement to set Caps lock and/or Num lock on and off via a Cron job. Now I have working scripts that do the job, but as soon as X starts up the jobs no longer run (well they appear to, but Caps lock and Num lock do not... (0 Replies)
Discussion started by: autotuner
0 Replies

5. Red Hat

Security Question: Lock after invalid login, Session Lock and Required Minimum Password Length

Hello all, If anyone has time, I have a few questions: How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too. 1. How to lock the account after a few (like 3) invalid password attempts? 2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies

6. Shell Programming and Scripting

sh: Detect key (CTRL/SHIFT/CAPS LOCK) state?

I'm trying to write a shell script that runs periodically and if I'm not at the keyboard, it should do one thing, but if I am at the keyboard, it should do another thing. Therefore I've decided that it would be good if I could press down the CTRL key, (or some other key) and have the shell script... (8 Replies)
Discussion started by: Ilja
8 Replies

7. UNIX for Advanced & Expert Users

Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied

Hi all, I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...). I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message. Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies

8. UNIX for Dummies Questions & Answers

Caps lock problem

hi all this s quite a foolish problem. I seem to hav pressed some keys s.t in unix, my letters are comin in caps and with caps lock on, i am getting lowercase letters. :o Pls help. Also is there any reference or manual where i can check in case such problems arrise? thanx in advance curiosity (4 Replies)
Discussion started by: curiosity
4 Replies

9. Shell Programming and Scripting

Generate all possible word with caps and no caps

With use of sed/awk, how can I print all possible combinations of a word with caps/non-caps. Eg Applying operation on "cap" should generate output as follows. cap CAP Cap cAp caP CAp cAP CaP (12 Replies)
Discussion started by: anil510
12 Replies
XMODMAP(1)						      General Commands Manual							XMODMAP(1)

NAME
xmodmap - utility for modifying keymaps and pointer button mappings in X SYNOPSIS
xmodmap [-options ...] [filename] DESCRIPTION
The xmodmap program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the user's session startup script to configure the keyboard according to personal tastes. OPTIONS
The following options may be used with xmodmap: -display display This option specifies the host and display to use. -help This option indicates that a brief description of the command line arguments should be printed on the standard error channel. This will be done whenever an unhandled argument is given to xmodmap. -grammar This option indicates that a help message describing the expression grammar used in files and with -e expressions should be printed on the standard error. -verbose This option indicates that xmodmap should print logging information as it parses its input. -quiet This option turns off the verbose logging. This is the default. -n This option indicates that xmodmap should not change the mappings, but should display what it would do, like make(1) does when given this option. -e expression This option specifies an expression to be executed. Any number of expressions may be specified from the command line. -pm This option indicates that the current modifier map should be printed on the standard output. This is the default mode of opera- tion if no other mode options are specified. -pk This option indicates that the current keymap table should be printed on the standard output. -pke This option indicates that the current keymap table should be printed on the standard output in the form of expressions that can be fed back to xmodmap. -pp This option indicates that the current pointer map should be printed on the standard output. - A lone dash means that the standard input should be used as the input file. The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc. EXPRESSION GRAMMAR
The xmodmap program reads a list of expressions and parses them all before attempting to execute any of them. This makes it possible to refer to keysyms that are being redefined in a natural way without having to worry as much about name conflicts. The list of keysym names may be found in the header file <X11/keysymdef.h> (without the XK_ prefix), supplemented by the keysym database /usr/share/X11/XKeysymDB. Keysyms matching Unicode characters may be specified as "U0020" to "U007E" and "U00A0" to "U10FFFF" for all pos- sible Unicode characters. keycode NUMBER = KEYSYMNAME ... The list of keysyms is assigned to the indicated keycode (which may be specified in decimal, hex or octal and can be determined by running the xev program). Up to eight keysyms may be attached to a key, however the last four are not used in any major X server implementation. The first keysym is used when no modifier key is pressed in conjunction with this key, the second with Shift, the third when the Mode_switch key is used with this key and the fourth when both the Mode_switch and Shift keys are used. keycode any = KEYSYMNAME ... If no existing key has the specified list of keysyms assigned to it, a spare key on the keyboard is selected and the keysyms are assigned to it. The list of keysyms may be specified in decimal, hex or octal. keysym KEYSYMNAME = KEYSYMNAME ... The KEYSYMNAME on the left hand side is translated into matching keycodes used to perform the corresponding set of keycode expres- sions. Note that if the same keysym is bound to multiple keys, the expression is executed for each matching keycode. clear MODIFIERNAME This removes all entries in the modifier map for the given modifier, where valid name are: Shift, Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5 (case does not matter in modifier names, although it does matter for all other names). For example, ``clear Lock'' will remove all any keys that were bound to the shift lock modifier. add MODIFIERNAME = KEYSYMNAME ... This adds all keys containing the given keysyms to the indicated modifier map. The keysym names are evaluated after all input expressions are read to make it easy to write expressions to swap keys (see the EXAMPLES section). remove MODIFIERNAME = KEYSYMNAME ... This removes all keys containing the given keysyms from the indicated modifier map. Unlike add, the keysym names are evaluated as the line is read in. This allows you to remove keys from a modifier without having to worry about whether or not they have been reassigned. pointer = default This sets the pointer map back to its default settings (button 1 generates a code of 1, button 2 generates a 2, etc.). pointer = NUMBER ... This sets the pointer map to contain the indicated button codes. The list always starts with the first physical button. Setting a button code to 0 disables events from that button. Lines that begin with an exclamation point (!) are taken as comments. If you want to change the binding of a modifier key, you must also remove it from the appropriate modifier map. EXAMPLES
Many pointers are designed such that the first button is pressed using the index finger of the right hand. People who are left-handed fre- quently find that it is more comfortable to reverse the button codes that get generated so that the primary button is pressed using the index finger of the left hand. This could be done on a 3 button pointer as follows: % xmodmap -e "pointer = 3 2 1" Many applications support the notion of Meta keys (similar to Control keys except that Meta is held down instead of Control). However, some servers do not have a Meta keysym in the default keymap table, so one needs to be added by hand. The following command will attach Meta to the Multi-language key (sometimes labeled Compose Character). It also takes advantage of the fact that applications that need a Meta key simply need to get the keycode and don't require the keysym to be in the first column of the keymap table. This means that appli- cations that are looking for a Multi_key (including the default modifier map) won't notice any change. % xmodmap -e "keysym Multi_key = Multi_key Meta_L" Similarly, some keyboards have an Alt key but no Meta key. In that case the following may be useful: % xmodmap -e "keysym Alt_L = Meta_L Alt_L" One of the more simple, yet convenient, uses of xmodmap is to set the keyboard's "rubout" key to generate an alternate keysym. This fre- quently involves exchanging Backspace with Delete to be more comfortable to the user. If the ttyModes resource in xterm is set as well, all terminal emulator windows will use the same key for erasing characters: % xmodmap -e "keysym BackSpace = Delete" % echo "XTerm*ttyModes: erase ^?" | xrdb -merge Some keyboards do not automatically generate less than and greater than characters when the comma and period keys are shifted. This can be remedied with xmodmap by resetting the bindings for the comma and period with the following scripts: ! ! make shift-, be < and shift-. be > ! keysym comma = comma less keysym period = period greater One of the more irritating differences between keyboards is the location of the Control and Shift Lock keys. A common use of xmodmap is to swap these two keys as follows: ! ! Swap Caps_Lock and Control_L ! remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L This example can be run again to swap the keys back to their previous assignments. The keycode command is useful for assigning the same keysym to multiple keycodes. Although unportable, it also makes it possible to write scripts that can reset the keyboard to a known state. The following script sets the backspace key to generate Delete (as shown above), flushes all existing caps lock bindings, makes the CapsLock key be a control key, make F5 generate Escape, and makes Break/Reset be a shift lock. ! ! On the HP, the following keycodes have key caps as listed: ! ! 101 Backspace ! 55 Caps ! 14 Ctrl ! 15 Break/Reset ! 86 Stop ! 89 F5 ! keycode 101 = Delete keycode 55 = Control_R clear Lock add Control = Control_R keycode 89 = Escape keycode 15 = Caps_Lock add Lock = Caps_Lock ENVIRONMENT
DISPLAY to get default host and display number. SEE ALSO
X(7), xev(1), setxkbmap(1), XStringToKeysym(3), Xlib documentation on key and pointer events BUGS
Every time a keycode expression is evaluated, the server generates a MappingNotify event on every client. This can cause some thrashing. All of the changes should be batched together and done at once. Clients that receive keyboard input and ignore MappingNotify events will not notice any changes made to keyboard mappings. Xmodmap should generate "add" and "remove" expressions automatically whenever a keycode that is already bound to a modifier is changed. There should be a way to have the remove expression accept keycodes as well as keysyms for those times when you really mess up your map- pings. AUTHOR
Jim Fulton, MIT X Consortium, rewritten from an earlier version by David Rosenthal of Sun Microsystems. X Version 11 xmodmap 1.0.7 XMODMAP(1)
All times are GMT -4. The time now is 07:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy