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

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

Re: CUA mode, turn off Shift+Curvor Move to Select


From: Lennart Borgman (gmail)
Subject: Re: CUA mode, turn off Shift+Curvor Move to Select
Date: Sun, 31 Aug 2008 01:35:03 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

Xah wrote:
> 2008-08-30
> 
> Thanks Lennart.
> 
> Now I'm trying to make the following keybindings:
> 
> (add-hook 'cua-mode-hook
>  (lambda ()
>  (define-key cua-global-keymap (kbd "M-C") 'scroll-down)
>  (define-key cua-global-keymap (kbd "M-T") 'scroll-up)
>  )
> ) ; Dvorak keyboard
> 
> So that, M-C will run scroll-down, instead of cua-scroll-down.
> However, it doesn't work.
> 
> Apparently, the cua-mode uses some mechanism that simply alias scroll-
> down to cua-scroll-down.
> 
> in cua-base.el, there's this line:
> 
>   ;; scrolling
>   (define-key cua-global-keymap [remap scroll-up]     'cua-scroll-up)
>   (define-key cua-global-keymap [remap scroll-down]   'cua-scroll-down)
> 
> What's the remap in the vector there?

Just search for this in the elisp manual

  C-s [remap

and you will get to the page

  (info "(elisp) Remapping Commands")

> How to do what i want?
> 
> Thanks
> 
>   Xah
>http://xahlee.org/
> 
>
> 
> On Aug 30, 7:00 am, "Lennart Borgman (gmail)"
> <address@hidden> wrote:
>> Xahwrote:
>>> in CUA mode, is there a way to make it so that when Shift key is down
>>> and cursor is move, it doesn't select?
>> That would not really be CUA mode ...
>>
>>> That is, i want it to do
>>> (transient-mark-mode t)
>>> (delete-selection-mode t)
>>> and Ctrl+ZXCV for undo cut copy paste, but i don't want the Shift
>>> +CursorMove to Select behavior. (because that behavior is incompatible
>>> with my ergonomic keybinding. I need to suggest to users a way to turn
>>> this this off)
>> There is a property on the command symbol that controls this.
>>
>>> Alternatively, is there a way that only turn on the Ctrl+ZXCV
>>> shortcuts without all the other features?
>>> Thanks in advance again.
>>>  Xah
>>> ∑http://xahlee.org/
>>> ☄
> 
> 




reply via email to

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