Richard Stallman <address@hidden> writes:
Binding some set of shifted keys to a command that says "run the
equivalent non-shifted character but do this other special thing"
seems better, because you could override that for individual shifted
keys if you wish.
The problem is that running something based on the key - rather
than on the command bound to that key is a bad road to take.
CUA mode looks for a 'CUA property with value 'move to detect what
keys are movements to which the shift modifier may apply.
This has the advantage that unrelated modes simply set that property
to make them "CUA aware".
A generic solution could be to look for a non-nil 'shift property on
the command and run a shifted-key-hook prior to running the command,
i.e. something like this in the command loop just before running the
command:
if (!NILP (Vshifted_key_hook) && key_shifted_p
&& !NILP (Vthis_command)
&& SYMBOLP (Vthis_command)
&& !NILP (Fget (Vthis_command, Qshift))
&& !NILP (Vrun_hooks))
safe_run_hooks (Qshifted_key_hook);
This could be combined with the delayed deactivate-mark hack
we discussed earlier to deactivate the mark on non-shifted movement...
I can make a patch to do this...