deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

can't enter capital accented characters #32

Closed rudolfII closed 7 years ago

rudolfII commented 7 years ago

Some of the recent changes allowed me to enter (Czech) accented characters, however, I can't enter capital accented characters. E.g., using capslock + accented letters does not do what it does in other programs. Furthemore: I use the menu-key to switch keyboards. This works in sam, too, however, pressing the key also draws a 'rectangle' in the buffer (while nothing should, I believe, appear).

deadpixi commented 7 years ago

Ahoj @rudolfll.

What key sequences/modifierd are you typing to enter accented characters?

Have you tried adding accented characters to the .keyboard file in your home directory and using the sequences you define there? I know this isn't as convenient a way to enter them, but if it works this way we at least know that the characters will render correctly and the bug is on the input side.

As for the layout switch, what key sequence are you using? Is it just the menu key or is it menu+something?

Thanks!

rudolfII commented 7 years ago

Hello Rob,

On 15 September 2016 at 15:12, Rob King notifications@github.com wrote:

What key sequences/modifierd are you typing to enter accented characters?

I actually usually do not use any modifier to enter the lower-case accented characters, I just switch the keyboard layout to the Czech one. The lower-case accented letters are then directly available under the 1-0 keys without any modifier (this recently started to work in your sam, too [before, only some of these worked (under 6-0) but others did not (1-5)]). Alternatively, one can use a dead key for accents followed by a letter. This still does not work in sam: what elsewhere works as a dead key, gets to sam and a rectangle is drawn immediately.

For capital accented letters one usually uses a dead key again, after which shift-letter is pressed. (Similarly to the lower-case letters, this does not work in sam.) Alternatively, and this is what I meant in the first place, one can switch on the caps-lock and then use the 1-0 keys again, as in the case of entering the lower-case letters. This does not work, either: caps-lock makes no difference, lower-case accented letters are always drawn.

Have you tried adding accented characters to the .keyboard file in your home directory No, I haven't yet.

I know this isn't as convenient a way to enter them, but if it works this way we at least know that the characters will render correctly and the bug is on the input side. I will possibly try that.

As for the layout switch, what key sequence are you using? Is it just the menu key or is it menu+something? It is just the 'menu' key by itself.

Thanks Ruda

RamKromberg commented 7 years ago

Maybe you're referring to the libXg's sequences for ligatures and special marks? alt+a, release, press e, release = Ae ligature alt+e, release, press s: release = empty set symbol

They're detailed here: https://github.com/deadpixi/sam/blob/master/libXg/latin1.c

deadpixi commented 7 years ago

@RamKromberg @rudolfII Using the composition sequences in latin1.c (or defined in your own .keyboard file) would definitely work, but I'd still like to figure out how to get dead keys working properly.

It shouldn't be too hard.

(Famous last words.)

RamKromberg commented 7 years ago

@deadpixi I suspect his issue is that the secondary keyboard layout of his specific language uses the same ascii codes for lower case letters as accented latin 1 while adding some kind of shift to the upper case ones.

deadpixi commented 7 years ago

@rudolfII Please try the latest code in master. I set my keyboard to "Czech" and got what Wikipedia tells me I should get. :) Note that this is for caps-lock only; the dead keys still don't work.

Please close this issue if you think it's resolved; if not, please let me know what problems you're still having.

If you don't mind, please open a separate issue for the dead key problem, as I think that should be tracked separately. Thanks!

rudolfII commented 7 years ago

Hello,

On 19 September 2016 at 07:52, Rob King notifications@github.com wrote:

@rudolfII Please try the latest code in master. I set my keyboard to "Czech"and got what Wikipedia tells me I should get. :) Note that this is for caps-lock only; the dead keys still don't work.

Caps-lock way works now. Thanks! :)

Ruda