Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-close doesn't work for backquotes ` in the Spanish keyboard #835

Open
Akronix opened this issue Mar 22, 2019 · 8 comments
Open

auto-close doesn't work for backquotes ` in the Spanish keyboard #835

Akronix opened this issue Mar 22, 2019 · 8 comments

Comments

@Akronix
Copy link
Contributor

Akronix commented Mar 22, 2019

Hi.

I use the plugin auto-close and thus I've disabled all the options for Completions > auto-close inside Geany preferences.

In auto-close, I have the following config:
image

The plugin works for all the symbols and in all languages except for the backquote, which behaves as It'd be any other usual character: It does not auto-close or generate two backquotes when I type one.

I'm using Geany 1.33 on Ubuntu 16.04 and Spanish layout for the keyboard.

@Akronix
Copy link
Contributor Author

Akronix commented Mar 22, 2019

Interesting, I've tried changing the keyboard layout to English and now it works 😕

To add some extra information, in the Spanish keyboard, we need to type the ` key twice in order to print it alone (it's like, first type on it keeps waiting for another character to decorate it, so it forms letters like: à, ù,.. same for our ´ symbol)

@Akronix Akronix changed the title auto-close doesn't work for backquotes ` auto-close doesn't work for backquotes ` in the Spanish keyboard Mar 22, 2019
@elextr
Copy link
Member

elextr commented Mar 22, 2019

Composing is part of the input method. Thats way before Geany sees the keystrokes, X11 and its input processing and GTK and its input methods all have their evil way with the keys way before Geany sees them. We just get the resulting composed character. So when you type it twice does it produce the Ascii code for backquote, or some other character?

@Akronix
Copy link
Contributor Author

Akronix commented Mar 22, 2019

When I type it twice, I get one single `.

@elextr
Copy link
Member

elextr commented Mar 22, 2019

But is that the same character code? The plugin likely only recognises the Ascii code 0x60.

@Akronix
Copy link
Contributor Author

Akronix commented Mar 23, 2019

I have written a small program in pascal which tells me the ascii code of the keys I press and I get that same ascii code in both english keyboard and in spanish keyboard with second press (first press on ` returns nothing).

@elextr
Copy link
Member

elextr commented Mar 24, 2019

Ingenious, but sadly not nesccessarily right since GTK also does keyboard handling and your program doesn't account for that 😞

Probably best is to create files in Geany, one with English keyboard and one with Spanish and look at them with a hexdump program (GHex or similar) to see if they are the same.

I'm pushing this because we have had a problem where GTK translates a c to a Cyrrilic c but v stays as Ascii v (making ctrl-c not work, and ctrl-v still work) and we need to rule it out.

.

@Akronix
Copy link
Contributor Author

Akronix commented Mar 24, 2019

They are the same:
image
The files in case you want to download them.

@Akronix
Copy link
Contributor Author

Akronix commented Apr 7, 2019

As a side note, this works in the Atom editor with the Spanish keyboard: after pressing twice the key for `, I get two `.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants