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

Error when adding layout #45

Closed
oyvindknustad opened this issue May 9, 2024 · 4 comments
Closed

Error when adding layout #45

oyvindknustad opened this issue May 9, 2024 · 4 comments
Labels
wontfix This will not be worked on

Comments

@oyvindknustad
Copy link

oyvindknustad commented May 9, 2024

Hi. Love this extension. I'm not sure this is a bug or something I'm doing wrong.

I'm trying to add a Norwegian layout by following the ReadMe. When I'm done and want to try it out, it gives the error:

image

Here's what I did:
I updated the keycodes.json, first with most of the new layout, then with only one letter changed to see if there was something I screwed up in there. I then added the name to langList in prefs.js and to keycodes in extension.js (which now are on lines 48 and 67. Some code must have been written since the line numbers are different from the ReadMe.)

I'm thinking that there's a flaw in the keycodes.json that makes the GLib.file_get_contents function not ok, and then the keycodes variable won't get assigned anything. But I can't figure out what I'm doing wrong in the json file.

@oyvindknustad
Copy link
Author

oyvindknustad commented May 9, 2024

Update: It might be a system thing (Debian 12 + Gnome). Because now I get the same error and a grey square up in the left corner of the screen, the moment I reinstall the extension.

image

I emptied /tmp/ and ran apt clean to see if there was temporary files that was causing the problem, but I'm getting the same result.

@Vishram1123
Copy link
Owner

Would you mind sending me your keycodes.json, so I can look through it to see if anything's wrong with it?

@Vishram1123 Vishram1123 added the question Further information is requested label May 23, 2024
@OscarParzon
Copy link

I add here. It is a problem with changing the keyboard language. The error does not seem to be the same, but...
OS: Ubuntu 23.20, Gnome 45.2 on Wayland

files that were modified:

in:
.local/share/gnome-shell/extensions/[email protected]/

files:
extension.js
keycodes.json
prefs.js

(the keycode.json modification is just a test, a copy of "qwerty" renamed "latin" was added, and only lines 347 to 353 were modified to show the letter ñ and Ñ)

result: the keyboard does not open.

I attach screenshots of modifications and keycodes file.
Captura desde 2024-05-27 11-17-56
Captura desde 2024-05-27 11-18-22
Captura desde 2024-05-27 11-19-01
keycodes.json

;-)

@Vishram1123
Copy link
Owner

I figured out what is happening. In order for this to work, you would need to recreate the entire Spanish layout in keycodes.json, and then on line 547 and 548, you would need to input the corresponding keyboard layout. Right now, because the added keyboard layout is not associated with a built in input source, it cannot initialize the keyboard with an input source. You could fix this by finding the associated keyboard layout, but I would simply suggest using the compose key combined with key sequences to accomplish the same effect. I will see if I have time to implement a Norwegian layout, but it appears that I am gonna have to implement a 4th layer (alt + shift) in order to accomplish this.

@Vishram1123 Vishram1123 added wontfix This will not be worked on and removed question Further information is requested labels May 29, 2024
@Vishram1123 Vishram1123 closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants