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

[Emacspeak] Re: Switching the C-e prefix key to another binding



Thanks, setting the emacspeak-prefix variable more or less 
resolved the issue, though I did have to play around with the 
bindings a bit.

For posterity, here is some code to set the prefix key to another 
binding, then reset C-e to end of line as in vanilla Emacs. I do 
like C-z, as in my opinion it's underutilized by default, and I 
tend to use C-e for end of line a lot

(setq emacspeak-prefix (vector ?\C-z))

;; Load Emacspeak
(load-file "<path>/emacspeak-setup.el")

(global-unset-key (kbd "C-e"))
(global-unset-key (kbd "C-z"))

(global-set-key (vector ?\C-z) emacspeak-keymap)
(global-set-key (kbd "C-e") 'end-of-line)

I did set the emacspeak-prefix before loading Emacspeak, though 
some quick testing suggests it doesn't matter whether it's loaded 
before or after Emacspeak is loaded.

Thank you, hope you're all having a good weekend.


Best,
Patrick



Tim Cross via Emacspeak <emacspeak(a)emacspeak.org> writes:

> Patrick Smyth via Emacspeak <emacspeak(a)emacspeak.org> writes:
>
>> Hi Emacspeakers,
>>
>> I'm back with another question. I'm looking to rebind the C-e 
>> Emacspeak prefix key to C-z. On Windows I had done this pretty
>> successfully with these:
>>
>> (global-set-key (kbd "C-z") emacspeak-keymap)
>> (global-set-key (kbd "C-e") 'end-of-line)
>>
>> That kind of works on Linux as well, in that C-z works as the 
>> prefix key and C-e works as a direct hotkey to go to end of 
>> line.
>> However, some actions, like switching buffers with C-x b, now 
>> produce this error:
>>
>> Key sequence C-e starts with non-prefix key C-e
>>
>> Is the buffer switching dependent on some macro or similar? How 
>> would you recommend rebinding C-e to another key sequence?
>>
>> I'm currently on Ubuntu 20.
>>
>
> You probably need to change the value of emacspeak-prefix in 
> order to
> change the prefix key used by Emacspeak. I suspect the approach 
> your
> using will generate inconsistent results because the code in 
> Emacspeak
> which sets the key bindings won't know you have changed the 
> prefix. 
>
> I would try setting emacspeak-prefix before loading emacspeak 
> and see if
> that is all you need to do. I would also check the emacspeak 
> manual as
> this is likely covered there as well. 
> _______________________________________________
> Emacspeak mailing list -- emacspeak(a)emacspeak.org
> To unsubscribe send an email to emacspeak-leave(a)emacspeak.org


|May 1995 - Last Year|Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page