Home Download Buy Blog Forum Support

Neo keyboard layout not full supported

Re: Neo keyboard layout not full supported

Postby shaslinger on Fri Jan 24, 2014 10:02 am

Thank for your tip,

my cursor down key is failing on my laptop, so I was in despair.
My laptop seams to be mapped differently, but with the tip from above what actually arrives at sublime, I saw AltGr comes in as Alt,
so for me
Code: Select all
{ "keys": ["alt+l"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["alt+a"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+i"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["alt+e"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["alt+o"], "command": "move_to", "args": {"to": "eol"}, "extend": false },
{ "keys": ["alt+u"], "command": "move_to", "args": {"to": "bol"}, "extend": false },
{ "keys": ["alt+v"], "command": "left_delete" },
{ "keys": ["alt+c"], "command": "right_delete" }

work nicely. Thanks for saving my day, or even better my laptop!

Warm regards,
Stefan
shaslinger
 
Posts: 3
Joined: Wed Dec 12, 2012 6:41 am
Location: Vienna, Austria

Re: Neo keyboard layout not full supported

Postby fabyeah on Sun Feb 23, 2014 4:58 pm

This has been a major PITA. I had a lot of trouble getting this to work without any disadvantages.

Thanks to the people posting solutions.

My solution is a little different. Once setup, it requires no script or constant manual changing of layouts:
(works on Ubuntu/Mint)


1) In Ubuntu/Mint (maybe in other distros as well) you can activate the feature that different applications can have different keyboard layouts. Activate it (Regional Settings -> Keyboard Layouts: Allow different layouts for individual windows)
2) Copy the NEO Keyboard layout. I have overwritten the "German Macintosh" one, because creating a new one was too much hassle for me. I recommend doing that. You can overwrite any existing, unused one. Choose one that's in the de file. This is what you do: go to usr/share/x11/xkb/symbols, open the folder as root. Open the "de" text file. Delete the "German Macintosh" Layout (obviously make backup of file before you edit it), then copy the whole Neo Portion and rename xkb_symbols "neo base" to xkb_symbols "mac_base" and rename xkb_symbols "neo" to xkb_symbols "mac" and include "de(neo_base)" to include "de(mac_base)" and name[Group1]= "German Neo 2" to name[Group1]= "German (Macintosh)".
3) add this after the includes:
key <RALT> { [ Alt_L, Alt_L, Alt_L, Alt_L, Alt_L, Alt_L, Alt_L, NoSymbol ] };
this will bind your AltGr to Left Alt. I prefer this to binding it to Windows key / Super_L, because Super_L + P is hardcoded to be the shortcut for changing display options (external display, clone display, etc). And I use the Neo Level4 with P for Return / new line a lot.
4) Add the German Macintosh keyboard Layout. You might need to deactivate Layout Change keys in the German Neo 2 Layout Options, if you have a problem with Capslock now.
5) Open Sublime Text, click on your keyboard layout icon in taskbar and choose "German (Macintosh)". Sublime will now always use this keyboard layout.
6) If you want the AltGr+P = Enter Functionality, do this: In Sublime: Put text input cursor anywhere, start recording a macro, press enter, stop recording a macro, save macro as "newline.sublime-macro"
7) And finally the sublime user keymaps, as already posted, but with alt instead of Super and with the alt+p macro:
[
{ "keys": ["alt+l"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["alt+a"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+i"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["alt+e"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["alt+o"], "command": "move_to", "args": {"to": "eol"}, "extend": false },
{ "keys": ["alt+u"], "command": "move_to", "args": {"to": "bol"}, "extend": false },
{ "keys": ["alt+v"], "command": "left_delete" },
{ "keys": ["alt+c"], "command": "right_delete" },
{ "keys": ["alt+p"], "command": "run_macro_file", "args": {"file": "Packages/User/newline.sublime-macro"} }
]

Now obviously, ALT has been partially rebinded. Though i never use the ALT key to access the menu, so it's not a problem for me. If you do though, that might be a problem.

Let me know if it works for you or if you find a better, easier way.
Hopefully this will be fixed in Sublime Text, soon...
fabyeah
 
Posts: 1
Joined: Sun Feb 23, 2014 4:34 pm

Re: Neo keyboard layout not full supported

Postby Elrond1337 on Mon Mar 24, 2014 1:47 pm

Thanks for sharing your solution fabyeah.

What is the problem with mapping LSGT to ALT_L in usr/share/X11/xkb/symbols/de ?
Judging by the prior discussion it would not work but why?

Do you have to restart to activate changes in this file?
Elrond1337
 
Posts: 2
Joined: Sun Oct 27, 2013 6:29 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 17 guests