help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Caps Lock affects Ctrl+keys


From: Yuri Khan
Subject: Re: Caps Lock affects Ctrl+keys
Date: Tue, 21 Jan 2014 12:07:08 +0700

On Tue, Jan 21, 2014 at 9:10 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
>
> Just thought of one thing, there is a caps-mode.el,
> written by a man on this list, which is great, because
> it gives you caps lock functionality, but *buffer
> local* (and thus obviously contained to Emacs).

Nice. I had to s/last-command-char/last-command-event/ in
github:emacsmirror/caps-mode version, but otherwise it works and
preserves control combinations. It even works with Cyrillic letters,
thanks to the use of [remap self-insert-command] and (upcase
last-command-event).

This is a bit clumsy because I have to have different keys to turn on
caps in Emacs and in the rest of my environment, but will do for a
while.

> Because I see you are a C programmer, you
> might even want to check out a post on that I wrote
> some time ago, with some modifications to caps-mode,
> where it auto-disables after one word, so you can write
> a #define MONEY 0 with just one press of the caps key
> (preferably bounded to invoke caps-mode, not bothering
> with the physical keyboard state).

Actually in C++ we prefer preprocessor macros to be hard to type ;]
Anyway, I’d better bind an easy key to “upcase symbol to the left of
point”.

In fact I am working with a file where I need caps in some of the
columns but not in others. I might take the idea of caps-mode and add
a condition, so that it does the right thing for my case.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]