Re: Disabling ctrl-alt-<arrow> keys

Sarir Khamsi <[email protected]>
Newsgroups gmane.emacs.windows
Message-ID <[email protected]>
Drew Adams <[email protected]> spake thusly:

>> > I have my arrow keys C-M-down, C-M-up, C-M-right, and C-M-left mapped in
>> > Emacs to some of my functions (that used to work) and after I got a new
>> > Windows 7 laptop (same OS and Emacs 24.3.1, as before), I can't use
>> > those keys as some program is intercepting/disabling them. My graphics card
>> > hot keys are disabled but Emacs still doesn't respond. Any suggestions?
>> 
>> Did you try using w32-register-hot-key for them?

I did not, and haven't before on my last Windows 7 box.

> FWIW -
>
> I use Windows 7 (64-bit), I have no problem binding and using `C-M-up'
> etc., and I do not need to use `w32-register-hot-key' for them.  The
> same was true for Windows XP.

[...]

> Sarir: You do not say how you try to bind `C-M-up' etc.  For me it works
> to use any of the usual forms - for example:
>
> (global-set-key [(control meta up)] 'shrink-frame)
> (global-set-key (kbd "C-M-<up>")    'shrink-frame)
> (global-set-key [C-M-up]            'shrink-frame)

(global-set-key [(control meta down)] (quote sk-grow-frame-height))
(global-set-key [(control meta up)]
                (lambda () (interactive) (sk-grow-frame-height -1)))
(global-set-key [(control meta right)] (quote sk-grow-frame-width))
(global-set-key [(control meta left)]
                (lambda () (interactive) (sk-grow-frame-width -1)))

(defun sk-grow-frame-height (&optional increment frame)
  "Increase the height of FRAME (default: selected-frame) by INCREMENT.
Interactively, INCREMENT is given by the prefix argument."
  (interactive "p")
  (set-frame-height frame (+ (frame-height frame) increment)))

(defun sk-grow-frame-width (&optional increment frame)
  "Increase the width of FRAME (default: selected-frame) by INCREMENT.
Interactively, INCREMENT is given by the prefix argument."
  (interactive "p")
  (set-frame-width frame (+ (frame-width frame) increment)))


>
> "some program is intercepting/disabling them" - That would be my guess
> too.  You say you disabled any graphics-card and other hotkeys, but
> that would still be my guess.  What happens when you use `C-M-up' etc.
> outside of Emacs?

Not much. It used to rotate my display but it seems to do nothing now,
once I disabled those hotkeys.

> I guess you have already tried googling about this?  I see that some
> video cards use Alt + Cntl + left-arrow (up-arrow etc.) to rotate the
> screen.

Yeah, I freaked out before I knew what was happening. :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.