I've got a keyboard, where pressing M-C-S is uncomfortable (Meta and control are under the thumbs and Shift is on the far end of the keyboard). However, PageUp, PageDown, Home and End are in a very comfortable place. I never use any of those keys though, so I was thinking, if it was possible to remap, say, Home to act like M-C-S, that would make my life a lot easier. I would be even happier, if the solution wasn't Emacs-only, but on the system level (it is okay if it is Linux-only).
A pure Emacs solution that doesn't do exactly what you're asking, but close, would be to make e.g. Home be a key that adds the Ctrl, Shift and Alt modifiers to the next key that you press. That is, rather than press Home+key, you would press Homethen key.
Emacs has a built-in feature to add a modifier to the next key, bound to the unwieldy
C-x @ letter by default, e.g. if you type
C-x @ m a it's interpreted as
M-a. This is implemented via
function-key-map. Bindings in
function-key-map are overridden by key bindings in most maps, including the global keymap; if you want your binding to take precedence, define it in
input-decode-map instead. I've written a bit about it here.
You can adapt this mechanism to bind
(defun event-symbol-add-modifiers (symbol prefixes) (let* ((name (symbol-name symbol)) (parts (split-string name "-")) (old-modifiers nil)) (while parts (if (= (length (car parts)) 1) (setq old-modifiers (cons (aref (car parts) 0) old-modifiers))) (setq parts (cdr parts))) (while prefixes (if (not (memq (car prefixes) old-modifiers)) (setq name (concat (list (car prefixes) ?-) name))) (setq prefixes (cdr prefixes))) (intern name))) (defun event-apply-modifiers (event mask prefixes) (cond ((numberp event) (logior mask event)) ((symbolp event) (event-symbol-add-modifiers event prefixes)) ((consp event) (cons (event-symbol-add-modifiers (car event) prefixes) (cdr event))) (t event))) (defun event-apply-control-meta-shift-modifiers (ignore-prompt) "\\<function-key-map>Add the Ctrl, Meta and Shift modifier to the following event. For example, type \\[event-apply-control-meta-shift-modifiers] & to enter Ctrl-Meta-Shift-&." (vector (event-apply-modifiers (read-event) #xe000000 '(?C ?M ?S)))) (define-key input-decode-map [home] 'event-apply-control-meta-shift-modifiers)
event-apply-modifiers is a highly simplified version of Emacs's
event-apply-modifier and may be inferior in some circumstances. Minimally tested.)