Page 1 of 1

[Solved] How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 5:35 am
by lau22
I sometime accidentally press Alt Gr + Space, instead of just Space. It prints what looks like a space character however it somehow different. At first it took me a while to figure out why when I was typing something like "git branch | sort", it would print "No command ' sort' found", eventually I found out it's this special "space" character.

I don't really know how or where (or WHY) this shortcut is setup. Is there any way to disable it?

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 7:13 am
by 1.618
Is it not in System > Keyboard shortcuts ?

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 9:59 am
by lau22
I've just had look but I didn't see it there. I guess it's more like all the special letters that show up when pressing Alt Gr + Letter. For example, with "A", it's "â", with "E", it's "€". This is fine, but with space it gives this special space character, which often breaks my code or command lines.

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 4:01 pm
by Cosmo.
I did enter AltGr-space inside a hex editor and only get hex 20 (as expected). So assume, that your shortcut-problem is not a system setting, but a setting or feature of your editor. Which do you use? Try it with another one.

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 5:48 pm
by lau22
It does it in both Terminator and the regular Mint Terminal, also in Sublime Text so I don't think it's something specific to an application.

I wonder if it could be related to my keyboard layout (French AZERTY), maybe some key combinations are setup on this layout but not on others?

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 7:45 pm
by Cosmo.
I have a German keyboard layout. So differences will be there.

You could add some more keyboard layouts and switch between them for testing this out. Then you know, if there is the origin for the problem.

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 8:09 pm
by WinterTroubles
I've found this Wikipedia article listing AltGr functions with all the standard regional keyboard layouts, https://en.wikipedia.org/wiki/AltGr_key#French ,the link I've posted takes you directly to the section on French keyboard layout, unfortunately it doesn't list anything for AltGr + Spacebar.

In fact the only mention I see ( I may have missed something) for AltGr + Spacebar is for the Finnish layout, where it adds a NonBreaking SPace, https://en.wikipedia.org/wiki/Non-breaking_space

I know this isn't necessarily useful, but, thought it might provide 'food for thought'.

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 8:29 pm
by Cosmo.
Another finding:

I took a look into the keyboard settings. You can pop up (at least with Cinnamon) a preview window. Now I see the following:

Choosing French there is no label on the space key
Choosing French alternative there is a label nobreakspace on the top right of this key
Choosing French alternative old the same label is on the bottom right of the key.

I have no experience and no idea, what this means in practical terms, but for me it seems, as if a French keyboard setting and another French keyboard setting are not the same. Maybe a French user (i.e. lau22) can use this finding.

Re: How to disable Alt Gr + Space shortcut

Posted: Fri Dec 19, 2014 9:12 pm
by WinterTroubles
Good thinking Cosmo, maybe I should have looked there before the net :lol:

Expanding on Cosmo's findings, with my english keyboard layout in cinnamon there is a button in the bottom right corner of the 'keyboard layout' tab of keyboard settings labeled 'options'.. one of the options in this section is the behaviour of spacebar regarding nobreaking space, there is an option to 'use a normal space at any level', which I think means never a nobreaking space.

Not knowing which desktop you are using lau22, I can't say where these options are on your system, but, I would expect them to be there.

Re: How to disable Alt Gr + Space shortcut

Posted: Sun Dec 21, 2014 4:44 pm
by lau22
Yes that was it - in the layout options, the option "Using space key to input non-breakable space character" was set to "Default". I've set it to "Usual space at any level" and now I always get a regular space character. Thanks a lot for the help! :)

Re: How to disable Alt Gr + Space shortcut

Posted: Sun Dec 21, 2014 4:51 pm
by WinterTroubles
You are welcome Lau22 :)

Can please read the red line in my signature and mark your thread solved if you agree that it is, many thanks :)

Re: How to disable Alt Gr + Space shortcut

Posted: Tue Dec 23, 2014 1:21 am
by aabharan
Pressing Alt Gr is the same as pressing Ctrl+Alt . ... Page Up; Shift + Space. Enjoy !