Only problem is I find myself continuously pressing my capslock(modeswitch) with my pinky throughout the use of "IJKL" arrow keys. Thought it might be useful to have it as a toggle instead.
I thought the same originally. In the end I found that I need the switch too often to have it as a group switch. If the pinky bothers you, try using one of the Alt keys. If you have a keyboard with nice big Alt keys they are usually placed conveniently under the thumb. Then make the capslock a mod key, or control key (as it should be!). For inputting multiple languages I find myself liking Xcompose alot.
]]>I've seen some of that and its especially useful for inputting multiple languages seamlessly. In my case, for a quick secondary modifier, the mode switch is enough. Only problem is I find myself continuously pressing my capslock(modeswitch) with my pinky throughout the use of "IJKL" arrow keys. Thought it might be useful to have it as a toggle instead.
]]>A small example of how that would work with xmodmap
! remap caps_lock to do mode switching
remove Lock = Caps_Lock
keycode 66 = Mode_switch ISO_Next_Group Mode_switch ISO_Next_Group
! --- GROUP 1 ---- ---- GROUP 2 ----
keycode 43 = h H Left Home
keycode 44 = j J Down Next
keycode 45 = k K Up Prior
keycode 46 = l L Right End
This small snippet remaps the hjkl keys (on my keyboard at least. Check xev for the correct keycodes).
When you hold down the remapped Caps_Lock, you switch temporarily to the next group, allowing arrow movement on yout hjkl keys. If you press Shift+Caps_Lock (ISO_Next_Group), then you move to the next group, allowing access to the Group 2 keys without holding a modifier down. In that mode, shift would invoke Prior, Next, Home, End, and Shift+Caps_Lock would switch to the next group (Group 1). You can have more than 2 groups, and of course, you can bind your Mode_switch and ISO_* to whatever you like.
This will allow for a very complex and customized key layout, with many layers. If you are into power remapping, and like to learn a new layout, have a look at Neo, a subset of the de (german) layout. It is excellent to study to see what can be done with your keyboard.
Hope this helps.
.]
]]>The weird thing is the webby above seems to indicate an "inbuilt" functionality.
]]>#!/bin/bash
if [ ! -f /tmp/mod_key_state ]
then
touch /tmp/mod_key_state
*** DO SOMETHING***
else
*** DO SMOTHING ELSE ***
rm /tmp/mod_key_state
fi
Hope one of them helps at least.
]]>Is there a way to make the mode_switch key act as a toggle?
I found this from the a link in the emacs wiki.
http://www.tldp.org/HOWTO/Keyboard-and- … TO-15.html
"Can the Shift, Ctrl and Alt keys be made to behave as toggles?"
Yes, after saying
% loadkeys
keymaps 0-15
keycode 29 = Control_Lock
keycode 42 = Shift_Lock
keycode 56 = Alt_Lock
%
First of all, I can only run the program in console and not in X which is fine.
% loadkeys
keycode 108 = Control_Lock
(null):2: syntax error
syntax error in map file
key bindings not changed
I keep getting the above errors. Any loadkeys gurus out there?
Also, I read in the arch linux installation guide, it states that loadkeys only applies in console mode.
KEYMAP: Defines the keymap to load with the loadkeys program on bootup. Possible keymaps are found in /usr/share/kbd/keymaps. Please note that this setting is only valid for your TTYs, not any graphical window managers or X! Again, the default is fine for US users