I can not do Alt Gr + 7or Alt Gr + '-' (|) symbol. When i try to do them, it either opens a new window or shrinks the block of code that my mouse cursor is currently in. In Android Studio ->Settings->Keymaps, i couldnt't find these shortcuts. What is the problem with android studio? how does it expect me to write an app without using { and | symbols? How can it steal important code shortcuts?
Related
I am trying to use Odoo with the application Barcode & QR code Keyboard, from Nikola Antonov (just an example, I do not know if there are better options), in order to read barcodes for the pickings.
The first problem I had to face was I had to show the keyboard in this picking view
So I needed to create an input field in order to click in it and show the Android Keyboard, or in this case the Nikola Antonov keyboard. Then, I had to assign the function handler to this input text field:
this.$('#input_text_barcodes').on('keyup', self.getParent().barcode_scanner.handler);
The function is only working as expected if I use the normal Android Keyboard (AOSP) and only with numbers. The letters of the Android Keyboard or whatever character of the Nikola Antonov Keyboard are not working (only the backspace)
this.handler = function(e){
self.$('#aux_label').text('>> CODE: ' + e.which)
self.$('#aux_label').text('>> KEY CODE: ' + e.keyCode)
self.$('#aux_label').text('>> KEY: ' + e.key)
// [...]
I tried switching the languages of the keyboard as well, but with the same result
Should I change the keyup event?
Is there other way to catch the characters?
Finally I have asked to the developer of the application directly and he solved the problem quite fast. He made it work with numeric keys, that is enough for what I wanted to achieve.
As you know there is many useful shortcuts that improve you coding speed.
One of them is find usage of Class or Method that works with Alt+F7 or Ctrl+b. they works on methods and class names but I wonder how I can find a Usage of XML file like Layout Without Search in project and use Find Usage.
Because the name of XML file is not in the file Like classes and I Always search it's name in whole project.
I googled but could not find any answer.
All keys are given for windows
CTRL + F for find keywords in a single file
Can do it like this
Find usage of an XML| ALT + F7 after you select the XML layout
There is another way(not sure you gonna like it) ..
Try to delete a xml and it will not be deleted at the first time.It will show you all the usages of it ask you to confirm you deletion. You can see all the usages at the terminal,so that way you can find them all.
click on view usages button it will show them all
For any short-key File -> Settings -> Keymap -> (you can even Choose Eclipse/Visual Studio short key types in android studio)
Here are some default short keys for windows
Format code | CTRL + ALT + L
Add unimplemented methods | CTRL + I
Show logcat | ALT + 6
Build | CTRL + F9
Build and Run | CTRL + F10
Find | CTRL + F
Find in project| CTRL+SHIFT + F
Find and replace | CTRL + R
Find and replace in project | CTRL + SHIFT + R
Override methods | CTRL + O
Show project | ALT + 1
Hide project - logcat | SHIFT + ESC
Collapse all | CTRL + SHIFT + NumPad +
View Debug Points | CTRL + SHIFT + F8
Expand all | CTRL + SHIFT + NumPad -
Open Settings | ALT + s
Select Target (open current file in Project view) | ALT + F1 → ENTER
Search Everywhere | SHIFT → SHIFT (Double shift)
Code | Surround With | CTRL → ALT + T
Create method form selected code | ALT + CTRL
My personal preference is ctrl+shift+f. It will display a popup dialog in which you can type the thing that you are searching and it will look in your entire project folder.
Alternately there is already a Find Usage feature in xml when you right click it. And it does shows the file that uses it.
In my example I did find the use of my analytics_debug.xml then a mini console below will show indicating which file uses it. Selecting the file in usage console redirects you to the exact line of code in which the XML is called.
I reproduce this usecase in Ubuntu 16.04, A.S. version 2.1.1.
From IntelliJ IDEA Documentation:
Finding Usages in the Current File
To find usages of a symbol in the current file:
Click the desired symbol in the editor, or in the Structure view.
On the main menu, choose Edit | Find | Find Usages in File, or press Ctrl+F7. The encountered usage is
highlighted in the editor.
But this didn't work in Linux, instead use ALT+F7
For Mac users the shortcut is
First select the file in project view (⌥ + (fn) + F1)
hit enter to select 1st option or select
show usage of file (⌥ + (fn) + F7)
hit enter to open the file
In Android Studio (IntelliJ) how do you execute a 'File Search' for a string within a Scope of files? Can Search Everywhere do this, I only see how to use it to search 'code', not 'files'
Example: Search for the string "Dummy Button" in the 'Workspace Scope'.
Expected Response: res/values/string.xml:line4
You can do it in two ways,
Goto Menu -> Edit -> Find -> Find in Path
Or use the shortcut,
ctrl+shift+f
In Android Studio,
On a Windows or Linux based machine use shortcut Ctrl + Shift + F to search any string in whole project. It's easy to remember considering Ctrl + F is used to search in the current file. So just press the Shift as well.
On OSX use the Command key instead of Ctrl.
Use Ctrl + F combination for Windows and Linux to search in current file.
Use Shift + Shift (Double Tap Shift) combination for Windows and Linux to search Project File of Project.
Command+Shift+F on Mac to find in path
In Android Studio 4.1 update, the combination for Mac users changed, now you should use Control + Shift + f.
Try this. Enter your string name in dialogue box after pressing ctrl+shift+f
Menu Bar->Edit->Find->Find in Path...
Press Two times Shift button and write in search box it will search in whole Android studio.
In my case, I accidentally checked the box of "File mask". So all xml files are not searchable in Find in Path. Maybe this can help you.
I have multi android project in eclipse, when I read source code, I want to know all the reference for one class, but the Ctrl + Shift + G just the search result in the same project. even I click the right menu -- Reference--worksapce.
I just do this in android emulator for copying and pasting the data in edittext.
Ctrl + C = Copy
Ctrl + V = Paste
But it didn't works. So, i need to know if these shortcuts are working or not in emulator. Or, any other special shortcuts available for android emulator. Anyone knows this means, help me to find out the problem? Hope this will very useful for me. I'm working on Windows 7 Professional OS.
You can see the shortcuts by clicking on the "more" button:
And going to the "Help" tab:
For more information: Android Emulator.
You can check current config from console
emulator -help-keys
When running the emulator, use the following keypresses:
Ctrl-H Home button
Ctrl-M Menu (Soft-Left) button
Ctrl-Backspace Back button
Ctrl-Escape Power button
Ctrl-Equal Volume up button
Ctrl-Minus Volume down button
note that NumLock must be deactivated for keypad keys to work
Copy the text you want:
Ctrl + C = Copy
Then when the emulator is in focus, paste using:
Ctrl + V = Paste
Then in the edit text that you want, long click on the field until you see the emulator paste button pop up above your cursor. Click that and it should work.
In the Android Studio Emulator the ctrl+v doensn't works, just hold the left mouse button for a second and paste menu will appear (in textbox etc.).
For Mac OS, the most important shortcuts are:
Cmd + Backspace: Back button
Cmd + O: Overview (The square button)
Cmd + Shift + H: Home (The center button)
You can see the rest from the Triple Dot menu, go to Help section.