How to navigate code on a keyboard with no Home/End keys and no Fn key? - mobile

I'm looking at various laptops for one to program on while traveling and I found this one: the Asus Flip Chromebook:
It's already hard to find sub-15" laptops with a Del/PgUp/PgDn/End row which I use religiously while coding but most laptops have at least an "Fn" key to acquire most of this functionality from the arrow keys. But this laptop doesn't even have that.
I understand that this laptop is a Chromebook and isn't targeted at programmers but if someone wanted to use a laptop like this for programming, how can an environment and IDE be setup to account for these missing keys?
For example, to to select the current line I type Shift+Home if I'm at the end, Home+Shift+End if I'm below, etc.
What solutions and different workflows are available for this kind of keyboard?

Official Chromebook Shortcuts
It looks like Google may have you covered here, with their list of Chromebook-specific keyboard shortcuts. They do include shortcuts that work as Home, End, Page Up, Down, Delete.
Editor-specific shortcuts
If you're finding these shortcuts aren't working for your purposes, you can also check to see if the specific cloud IDE has keyboard shortcuts available, such as these for Repl.it. You might want to search up to see if there are keyboard shortcuts available for your preferred editor.
Personal Recommendations if the above options don't help
Some combinations I've noticed work:
Alt+left arrow to replace Home
Alt+right arrow to replace End
You can also add in the shift key here to highlight to the beginning and the end of the line respectively.
Page Up and Down are tricky but if you're using them to go to the top of the doc, you can make use of Ctrl+A which highlights everything. Then you can use the arrow keys to go to the left or right of the total selection:
Ctrl+A then left arrow to go to the top
Ctrl+A then right arrow to go to the bottom
If you're wanting to highlight a selection from the current cursor position to the top or bottom, you could try just holding shift and an up or down arrow key.
Note: With any navigation shortcuts you find, you can try to throw in shift when pressing them to also highlight at the same time, though, there will likely be some trial and error.

To use the Home, Page up, Page down, and End functions hold down the Fn key and press the corresponding arrow key.
Combination Function
Fn key with Left arrow Home
Fn key with Up arrow Page up
Fn key with Down arrow Page down
Fn key with Right arrow End

Related

codename one List scroll to the selected item

I want to display a list of names on the screen and a vertical alphabet scroll bar on the right side of it...similar to the contact list application in Android.
So when I click a letter from alphabet scroll bar, all the names starting with that letter should appear at the top of the screen.
List of names
That is what fixed lead section mode does. It fixes the selection in one place so the rest of the list moves around it. This is quite common in non-touch UI's for mobile phones but not so much for newer devices so this feature isn't mentioned in the developer guide or used anywhere in our samples...
Furthermore, please notice that we no longer recommend using List as explained in the section covering it in the developer guide. It's an advanced and complex component that won't deliver advantages for most common use cases.

(Unity3d) How do I make a "move pad" on the screen? (Mobile)

In my game you can control the character by moving left and right, jumping and attacking. (This is a mobile game) I have a button that I use to jump and attack, which is easy because I just make a button and jump or attack with OnClick(). But for moving, I don't know how to find out if the user is pressing the button, I only know when it is clicked. How can I find this out? thanks.
If you dont understand what Im trying to say, basically here is my web game: http://dugelstudios.weebly.com/weapon-plus-plus.html
(Does not work on chrome, using safari or internet exploror)
and i am porting it to mobile, and i dont know how to make the player move left and right with touch controls.
You can use other MonoBehaviour methods such as OnMouseOver to check if a button is pressed, OnMouseEnter when a user begins to press a button, and OnMouseExit to check if a user has released the button.
You can also use OnMouseUpAsButton to mimic the behaviour of Button.onClick
For draggings movements, (like movement. For example, if you have a thumbstick, or something similar for movement), you can use OnMouseDrag.
Also, completely unrelated to your question, but something you have mentioned, you can enable NPAPI to enable WebPlayer builds in Chrome.
Just paste chrome://flags/#enable-npapi in a new tab in Chrome, and click the "Enable" button to get it running
I believe there is a thumb stick asset the standard Unity asset pack that's available on the store.

GDK: Is there a way I can get if an arbitrary keyval or mouse button is down during a GdkEvent, or to see what GdkModifierType bits map?

(I asked a similar, unanswered question (only a X11-specific comment) months ago specifically pertaining to the Alt key; I have since refactored my requirements.)
I'd like to be able to see if the Alt key or if mouse buttons 8 or 9 are held at the time of an event in GDK, typically GdkEventButton, GdkEventMotion, and GdkEventKey, in the same fashion as the GdkModifierType state field in the various events.
However, the Alt key isn't automatically exported by GDK, as the Super, Hyper, and Meta keys are. Instead, the documentation merely states that MOD1 is typically the Alt key and that only mouse buttons 1-5 are explicitly supported. "pbor" suggested on IRC that all programs merely assume MOD1 is Alt, but I'd rather not make those kinds of assumptions, and that still doesn't help with the mouse buttons.
So my question is: is there a way I can detect these keys and buttons being pressed at the time of an event? For instance:
is there a way I can hand GDK a keysym and get out a GdkModifierType back? I see that there are ways to do the other way around and that require a hardware keycode...
is there an equivalent to the Windows API GetKeyState() function, which specifically returns the key state at the time of the message being processed, regardless of what is being held at the time of the call?
No code sample this time, sorry. Thanks.

Handle keyboard input on shell

I am developing a custom shell like bash (in C).
I am working right now on the events triggered by the arrows and the tab key. However, those special keys should be handled correctly.
What I want is to capture those keys and not let the CLI draw them on screen. What happens is that when the up arrow is pressed, for example, it draws the following symbol: '^[[A'
How can I stop it from happening? And what is the best way to read and map those keys?
It's kind of old, but some shells use terminal capabilities (termcaps) to block output and move the cursor.
You can also use the lib ncurses that is a cool wrapper for termcaps.

PhpStorm Move Caret to Next Blank Line

I'm used to the keyboard shortcut Ctrl DOWN in many editors that will jump the caret (cursor) to the next blank line in the code. This allows for quick navigation of the code.
Perhaps I completely missed it, but the action of "move caret to next blank line" or something like that is not in the Keymap list for the editor.
Do you know if such an option is there, and if not, can you recommend a good way to navigate the code? "Move Caret to Code Block Start" is not very intuitive to me when I'm moving about the code and the simple page-up, page-down are too coarse.
Edit: As #CrazyCoder says, this feature does not appear to be available. I've added a ticket for it on YouTrack. If you are also interested in this feature, please vote it up.
There is no such feature in PhpStorm (and in IntelliJ IDEA platform that it's based on) and surprisingly no one has requested it yet. Feel free to add your feature request.
If you are looking for the list of the most common navigation shortcuts, refer to the Default Keymap Reference that you can open from the Welcome screen, print, fold into a pyramid and put on your desk.
Since the 10/09/2015, there is the functions move caret backward a paragraph and move caret forward a paragraph (source).

Resources