librelist archives

« back to archive

swapping C-x and C-u

swapping C-x and C-u

From:
Tjaart van der Walt
Date:
2014-01-03 @ 15:34
Hi all,

I use the Dvorak keyboard layout, and in Emacs I swap C-x with C-u
because 'u' is in home row and much easier to reach than 'x'.

My Emacs configuration to do this looks like this:
(define-key key-translation-map [?\C-x] [?\C-u])
(define-key key-translation-map [?\C-u] [?\C-x])

Is there a way to achieve a similar result in Conkeror?

regards
-- 
Tjaart van der Walt

Re: [conkeror] swapping C-x and C-u

From:
Bruce Connor
Date:
2014-01-04 @ 11:12
You might be able to use autokey to permanently switch those two keys
inside cokeror.
On 3 Jan 2014 13:34, "Tjaart van der Walt" <tjaart@tjaart.co.za> wrote:

> Hi all,
>
> I use the Dvorak keyboard layout, and in Emacs I swap C-x with C-u
> because 'u' is in home row and much easier to reach than 'x'.
>
> My Emacs configuration to do this looks like this:
> (define-key key-translation-map [?\C-x] [?\C-u])
> (define-key key-translation-map [?\C-u] [?\C-x])
>
> Is there a way to achieve a similar result in Conkeror?
>
> regards
> --
> Tjaart van der Walt
>

Re: [conkeror] swapping C-x and C-u

From:
Philip Hudson
Date:
2014-01-04 @ 13:57
... if you are stuck on Windoze.

On X11 try xmodmap.



On 4 January 2014 11:12, Bruce Connor <bruce.connor.am@gmail.com> wrote:

> You might be able to use autokey to permanently switch those two keys
> inside cokeror.
>  On 3 Jan 2014 13:34, "Tjaart van der Walt" <tjaart@tjaart.co.za> wrote:
>
>> Hi all,
>>
>> I use the Dvorak keyboard layout, and in Emacs I swap C-x with C-u
>> because 'u' is in home row and much easier to reach than 'x'.
>>
>> My Emacs configuration to do this looks like this:
>> (define-key key-translation-map [?\C-x] [?\C-u])
>> (define-key key-translation-map [?\C-u] [?\C-x])
>>
>> Is there a way to achieve a similar result in Conkeror?
>>
>> regards
>> --
>> Tjaart van der Walt
>>
>


-- 
Phil Hudson                  http://hudson-it.no-ip.biz
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63

Re: [conkeror] swapping C-x and C-u

From:
John J. Foerch
Date:
2014-01-03 @ 16:06
On Fri, Jan 03, 2014 at 09:34:05AM -0600, Tjaart van der Walt wrote:
> Hi all,
> 
> I use the Dvorak keyboard layout, and in Emacs I swap C-x with C-u
> because 'u' is in home row and much easier to reach than 'x'.
> 
> My Emacs configuration to do this looks like this:
> (define-key key-translation-map [?\C-x] [?\C-u])
> (define-key key-translation-map [?\C-u] [?\C-x])
> 
> Is there a way to achieve a similar result in Conkeror?

Not really.  There are a couple of ways that one might go about this.
Cleanest would be to use keypress_hook to modify the combo that has been
pressed.  However, input_handle_sequence would also need to be patched to
allow this.

The other way of doing it would be to write a procedure that takes a
keymap, and swaps the "C-u" and "C-x" in it, and call this procedure on
all relevant keymaps.  It should also update the 'name' property of each
keymap.

Hope this helps.

-- 
John Foerch