Android Studio “extract method” shortcut Ctrl+Alt+M not working

允我心安 提交于 2021-01-26 10:57:59

问题


The android studio shortcut for extract function is not working for me. If I press Ctrl+Alt+M nothing is happening and when I tried to remap it to the same shortcut, I noticed that android studio doesn't seem to recognize the shortcut at all. So I tested my keyboard and everything should be working. I even reinstalled AS no dice.


回答1:


I found out that Nvidia Geforce Experience was capturing Ctrl + Alt + M shortcuts from android studio, even though I wasn't running any game, and didn't run any game recently. To disable this annoyance go to Nvidia Geforce Experience settings and disable in-game overlay. If it does't work check other program that you installed recently for some kind of overlay, hotkey or keyboard shortcut capturing.




回答2:


I think some program captures this hotkey. See https://superuser.com/questions/1282799/what-is-preventing-ctrl-alt-m-from-reaching-intellij-on-windows-10, https://superuser.com/questions/11308/how-can-i-determine-which-process-owns-a-hotkey-in-windows. After an hour of finding hotleys with these programs I still don't know which one is capturing.

I tried some programs to show a list of Windows hotkeys. I tried to assign new hotkeys in AS and other applications (Libre Office). They don't catch Ctrl+Alt+M and Ctrl+Alt+Shift+M, while catch other.

Currently I use Ctrl+Alt+,, I added it to shortcuts (see below). You can also use Ctrl+Alt+Shift+T, then press 8. Or Ctrl+AltGr+M (right Alt).

UPDATE

On self-isolation I carried a PC home. Plugged another keyboard, now Ctrl+Alt+M works. Even if I assign this combination to other applications like Libre Office.




回答3:


For Mac users: Command + Option + M




回答4:


Shortcut Ctrl+Alt+M is assigned to other function in Android Studio, search it and change shoorcut. It will works



来源:https://stackoverflow.com/questions/45665905/android-studio-extract-method-shortcut-ctrlaltm-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!