Re: [code] ` Follow up

From: Mitchell <m.att.foicica.com>
Date: Thu, 5 Oct 2017 16:09:04 -0400 (EDT)

Hi Pedro,

On Wed, 4 Oct 2017, Pedro Andres Aranda Gutierrez wrote:

> My own fix:
>
> I included the following code in ~/.textadept/init.lua
>
> --
> -- Fix for the ` key in the spanish keyboard
> --
> local previous = nil
> events.connect(events.KEYPRESS, function(code)
> local altcode = nil
> if previous == 65104 and code == 32 then
> altcode = string.byte('`')
> end
> previous = code
> if altcode ~= nil then
> if textadept.editing.typeover_chars and
> textadept.editing.typeover_chars[altcode] and
> buffer.selection_start == buffer.selection_end and
> buffer.char_at[buffer.current_pos] == altcode then
> buffer:char_right()
> return true
> end
> end
> end)

I think this is the best solution, and I'm glad you found it. This may be good wiki material in case anyone else happens to desire composed typeover characters. I cannot see an easy, universal way of handling this.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Thu 05 Oct 2017 - 16:09:04 EDT

This archive was generated by hypermail 2.2.0 : Fri 06 Oct 2017 - 06:34:45 EDT