Ubuntu 16.4 LTS下Android Studio 3.0添加Alt+鼠标左键快捷键问题求助
Hey there, I’ve dealt with similar desktop shortcut conflicts on Ubuntu before, so let’s walk through the fixes for your issue where Android Studio won’t recognize the Alt + Left Mouse Button combination (even though it picks up each input separately):
1. Resolve Ubuntu System-Level Shortcut Conflicts
Ubuntu’s default window manager (Unity) uses Alt + Left Mouse Button to move windows by default—this is almost certainly the culprit. Here’s how to reconfigure it:
- Open
System Settings→Keyboard→ Switch to theShortcutstab - Navigate to the
Windowscategory - Find the
Move windowoption (it’s bound to Alt + Left Mouse Button by default)- Either reassign it to a different combination (like Super/Windows + Left Mouse Button)
- Or click the shortcut field and press
Backspaceto disable it entirely
- Restart Android Studio after making this change, then try setting your shortcut again
2. Re-Add the Shortcut in Android Studio Properly
Sometimes the way you input the combination matters. Follow these steps carefully:
- Open Android Studio, go to
File→Settings→Keymap - Locate the action you want to bind to Alt + Left Mouse Button
- Right-click the action and select
Add Mouse Shortcut - In the pop-up dialog: hold down the Alt key first, then click the left mouse button—don’t click first or release Alt early
- Click
OKto save, then test the shortcut immediately
3. Clear Android Studio’s Cache
Corrupted cache files can cause weird input recognition issues. Let’s wipe them:
- Close Android Studio completely
- Open a terminal and run this command to delete the cache directory:
rm -rf ~/.AndroidStudio3.0/system/caches - Launch Android Studio again and attempt to set the shortcut once more
4. Verify Your JDK Setup (Optional)
Incompatible JDK versions can sometimes interfere with input handling. Make sure you’re using Android Studio’s built-in JDK:
- Go to
File→Project Structure→SDK Location - Check the
JDK locationfield—it should point to something like/opt/android-studio/jre - If it’s using a different JDK, switch to the built-in one and restart Android Studio
内容的提问来源于stack exchange,提问作者user9163511

