Now I am happy with my solution: I map left alt to Hyper, and then bind everything personal to Hyper. The mapping can be done in xmodmap: create a file, say, .Xmodmap, with
clear Mod1Then run xmodmap .Xmodmap (and put it to startup applications so it runs every time when login).
add Mod1 = Alt_L
add Mod3 = Hyper_L
add Mod4 = Super_L
keycode 108 = Hyper_L
Then in .emacs, set every key-binding you like with Hyper (I set a lot of them. Here are only some samples):
(global-set-key (kbd "H-g") 'goto-line)Another advantage is that I press left alt using thumb. Thumb is much stronger than little figure for frequent use :)
(global-set-key (kbd "H-l") 'forward-char)
(global-set-key (kbd "H-h") 'backward-char)
(global-set-key (kbd "H-j") 'next-line)
(global-set-key (kbd "H-k") 'previous-line)
(global-set-key (kbd "H-\\") 'math-eval)
(global-set-key (kbd "H-p") 'my-org-screenshot)
(global-set-key (kbd "<H-SPC>") 'save-buffer)
(global-set-key (kbd "<H-escape>") '(lambda () (interactive) (kill-buffer (current-buffer))))