Alt key doesn't work in Ubuntu [SOLVED]


(chuck_starchaser) #1

This has probably been asked before, but I can’t search for posts, as the captcha on the search form does not seem to --ever-- accept the words I enter, even though I know I’m entering them right.

There’s got to be some solution to this Alt key problem, better than having to transfer my file to a Windows machine. Been in Ubuntu for more than a year now, and suffering this lack of Alt- commands; but now it’s life or death, as I hid some objects in object mode, and now without Alt-H I have no way to bring them back, apparently.


(Lancer) #2

It’s because [ALT] is used by the main Ubuntu desktop. For example, holding [ALT] down lets you drag a window around, or if you have a 3D desktop, it might be a hotkey for allowing you to spin the views. This is overriding your Blender functions.

The fix is simple. Right next to the [ALT] key is one with a Windows logo on it. This is the [Super] key. Use it at the same time as [ALT] (hold them both down) to make your [ALT] functions work.


(Loolarge) #3

Search for something like “Window options” in the System preferences (My ubuntu is a german version). You can change from alt to super (windows key). Then the blender hotkeys will work as expected.


(dleri) #4

Your best bet is to remap the ALT key in Ubuntu’s system settings. If you have it I would suggest remapping it to the Windows key on the keyboard.


(test-dr) #5

for Ubuntu-10.04 (and later … or older as far as the Systemtools are the same, there might always be a little differences in the menu-entries-naming)
select from the top-menu-bar
System->
Configuraton
-> Keyboard

and in this tweak-program there is at the bottom of the window
the button “Options”
this popus a new window with “action-shortcuts” for
a lot of changes.(with + to open the sub-options)
One is for changing the actions for the Alt/Window keys
with menu-entries for:
default
and a lot of other settings like “change left-alt to left-window-key”
that is “use left-window-key instead of left-alt-key”.

edit: changing in this way the system-left-alt to the left-window
will be the setup for the programs … - thats in blender you dont
need to re-map every setting from Alt+key to left-window+key -
you now have to press “left-window” if you want the “alt-key”
in the program (not only blender … every program that may use
the alt-keys too).

edit2: in the keyboard-settings its in the second tab-window …


(test-dr) #6

this is an Update,
because i forgot it to mention again.
For using Ubuntu and
tweaking the user-interface
it is a good practice not to do it with the main-user.
Everyone playing around should create a new user
and test settings there. It is very easy to change
settings and no-one will later know what was changed.
You can even manage to have different keyboard settings
for different windows on-screen and you will totally confused
whats really happening without knowing.
Next, it is possible to create in this gui-tool (System->Preferences->Keyboard)
more than one keyboard-setting and then one would always have
the old config and the only thing is to enable it again(put it to the top of the list).


(chuck_starchaser) #7

Thank you all very much. I’m writing this reply as I try stuff…

I just tried Window and Alt keys together and it doesn’t work. Alt-H, Win-H, and Alt-Win-H, none of them reveals anything hidden.

Found it. System, Preferences, Windows. But it doesn’t work; I changed from Alt to Superkey; yet Alt-H still doesn’t work in Blender.

How do I remap a key? (I’m an eternal newbie in linux.)

Think I found it. This would be,
System->Preferences->Keyboard
Second tab (Layouts), Options button.
Third item, "Alt/Win Key Behavior ", open up:
Then click “Alt is mapped to Right Win, Super to Menu”
…(crossing fingers)…

SEMI-BINGO! :slight_smile:
Left Alt key now works!
Right Alt key still doesn’t, but this is good enough now.
Thank you!!!

EDIT:
Now I’m not sure which of the tweaks did the trick, because I was always testing with the right-Alt key, which never worked; and only at the end I tested the left-Alt key.


(test-dr) #8


! right-Alt and left-Alt key are not the same key!
And i hope you did read my hint about
creating a second user for login with default settings,
or better use this to check new settings.
There are too many options, all combined end up
in a dungeon without the red-wool-thread to find
the way back out of it.

If you have a “menu-key” on your keyboard (its at the
right side of the long space-bar between right-window
and right-ctrl) then you can use this to switch between
different keyboard settings (if you have entered another
one - for example one keyboard settings with acent-keys
and one without it - i use it, one for writing and the other
for programing when i shure need no combined accented
chars).


(test-dr) #9

OK! Never smile too early-?

Switching the keyboard-layout is only a workaround if it is temporary. I dont know if this is a bug, but when the switch from left-alt to left-window-key is activated at the next login all applications get this behavior/setting … and the modify has to set back at logout … to start again.

So its better to take the manual change for every key-setting …
What works is this:
For every window-manager(thats metacity by default) and x-window-shortcut exists the setting from gnome. All normaly stored in the users home-directory under
~/.gconf
~/.gconfd
But those subdirectories are pretty empty, because those settings are the default system-wide settings and are only stored in the users home-directory if the user makes any changes to them. And because i dont want to change the system-wide defaults … (they are in /var/lib/gconf …)
So first you may make a short backup of your user-local-settings like this in a terminal in your home-directory


tar -cvf gconf_back.tgz  ~/.gconf*

After this comes the work to change every key-action-entry with <Alt>
to <Super> to use the left windows-key instead of the left-alt-key.
Start:
gconf-editor
and there from the root /
open the +apps
go down in the tree to windowmanager:
+metacity
and select every page
general, global_keybindings, keybinding_commands, workspace_names
and there check for a key-setting with <Alt>
and edit this to <Super>

Then you have the simple rule, that everytime
you want to use some of the standard/default
linux/ubuntu/x-window keyfunctions you have to use LEFT-WINDOW-KEY
instead of LEFT-ALT-KEY
and in blender and every other application, that might try to use
alt-key + … anything
this combination is free and will not captured first by the windowmanager or the x11-window-graphics-system.
.-
If you need to use the made backup … remove the two subdirectories .gconf and .gconfd (better move “mv” those to /tmp) and untar your backup in your homedirectory (and check you did it at the right place …) and your old .gconf… settings are restored … logout/login to check it.


(Lipe7745) #10

how can I do the same using a notebook?
notebooks has no right alt


(test-dr) #11

if you are using ubuntu-10.04/…/11.04 (dont know for shure about 11.10)
and you use the default gnome
then you can “free the alt-key” from the x11-window-manager functions.

this is done with the “gconf-editor”
(you have to start it with alt-F2 commandline or from a terminal
and you should backup your user-gnome-settings or do first
tests with a new user)

in the gconf-editor tree the settings for the window-manager
(metacity) are in:
->apps->metacity->global_keybindings
and window_keybindings

you have to change every setting with an <Alt> in it and
replace the <Alt> with <Super> (= left-keyboard-windows-flag-key)

after this, these changed <Alt>-key-combinations are no more blocked
from the windowmanager and will work in blender and
to use these windowmanager-functions you have to press the windows-key.

You can even set those to “disabled”, but you have to do this for every key-binding.


(ndundupan) #12

anyone know how to work alt key with gnome shell?


(DrBouvierLeduc) #13

I’m resurecting this thread for ubuntu 11.10/unity users, as none of the solutions mentioned here worked for me :
In compiz settings manager (install it if needed) : general > general options => key mapping (or something like that) > window menu.
By default the shorcut is <alt>Button3, which messes blender’s shorcut.
Don’t disable this shorcut but change it to something else


(Stockpile) #14

Thank you so much, this is exactly what I am looking for! I have been spent hours changing keyboard shortcuts in both Blender and Gnome but to no luck - I either broke my workflow in Blender or in all other software I used. Finally I know a way to circumvent the window modifier while I work in Blender… (:


(Stockpile) #15

Thank you so much, this is exactly what I am looking for! I have been spent hours changing keyboard shortcuts in both Blender and Gnome but to no luck - I either broke my workflow in Blender or in all other software I used. Finally I know a way to circumvent the window modifier while I work in Blender… (:


(danilius) #16

The ultimate solution (for Ubuntu anyway) is to use CompizConfig Settings Manager, click through to the “Windows Management” subsection and then click into “Move Window”. In the “Initiate Window Move” option, change the button value from <Alt>Button1 to (for example) <Super>Button1. Hey presto, you can now move windows by holding down the Windows key and Button1 on your mouse, and Alt for loop select will work just dandy!


(johto760) #17

http://www.wackycodes.com/codes.html

Ctrl + Shift + U

then type the uXXXX

I don’t know what it’s called…

this works on any text program, used it on fb, gedit and the like…


(oneofmetwo) #18

This is EXACTLY what I needed! Thank you! No crazy work-arounds, this gets to the source of the problem (the Windows Management System). Thank you for pointing this out. Handily, I had already installed CompizConfig, so getting to this solution was a breeze. You rock.


(danilius) #19

Glad that helped. I recall being so frustrated trying to solve this problem, and yet the solution is so simple.