Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
The community reviewed whether to reopen this question 11 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have a Logitech keyboard (Ultra-Flat Keyboard Dark Shine to be exact), which has the context menu key in the middle of the windows and alt key, which is quite annoying.
Here's a screenshot of where the key is:
http://freshlog.com/grabs/ff532-How_do_I_remap_the_context_menu_key_in_Mac_OS_X
I can remap the windows and alt keys under the default Keyboard System Preferences Panel, but there doesn't seem to be a way to remap the context menu key.
Any ideas?
Use KeyRemap4MacBook (Karabiner for osx 10.9, 10.10). As Mecki pointed out, XML .keylayouts / Ukelele can't solve your problem.
In spite of the name, KeyRemap4MacBook works on any Mac (OS X 10.4 or later).
The settings you want are under "For PC Users" » "Change PC Application Key".
Use KeyRemap4Macbook. Edit private.xml file like this:
<item>
<name>Change Windows context menu key to Right option key</name>
<identifier>private.win_context_menu_option_key</identifier>
<autogen>--KeyToKey-- KeyCode::PC_APPLICATION, KeyCode::OPTION_R</autogen>
</item>
This code will remap right option key to the context menu key.
You can use Karabiner to map App to Command+Option:
You can then use Keyboard Maestro to map Command+Option+Letter, where Letter is a key that denotes an application, to focus the application:
For example, you can then do App+C to focus Chrome, App+T to focus Terminal, App+S to focus Slack etc. (if an app isn't already open, Keyboard Maestro opens it first).
If you're using a generic keyboard, then you have a dedicated App key:
If you're using an Apple keyboard, you have to hold Command and Option, but they are next to each other, and appear on both sides of the spacebar:
Keep in mind that OS X already uses Command+Option+Esc to open the Force Quit Applications dialogue, so you could now use App+Esc for that. Likewise, OS X uses Command+Option+W to close all of the windows in the focus application (tabs in Chrome).
Notes:
Karabiner is an open source kernel extension for modifying the way keyboard input is handled by OS X.
Keyboard Maestro is a proprietary application for creating keyboard shortcuts in OS X. It has a free 30 day trial, and costs $36.
The latest MacOS versions are served by Karabiner Elements 12.1.
Key-to-key remapping are done in the Simple Modifications tab and conveniently selected in 2 rows of drop-down-menus (see: screenshot).
Complex Modifications in this Preferences Panel's tab have either to be added by importing them from the internet (Karabiner-E.'s site) or from the user's ~/.config/karabiner/assets/ complex_modifications folder.
"Complex" ones from the net actually are also copied there and switched "on" (= [+ Enable]) in the tab.
ALL modifications are finally stored (& thus "activated") in ~/.config/karabiner/karabiner.json.
A pragmatic procedure (that also helps avoid mistakes while writing complex-mods yourself) is to copy & rename & alter one "imported" mod.
Once you are experienced (e.g.: different bracket types) it may be easier to edit the json file directly…
There is no longer the option to constrict remaps to specific windows (can be simulated by an osascript AppleScript) as some other features.
A non-Element version of Karabiner is being developed.
Two sites to get information & questions (answered) – but please search for previous "doubles" !:
github.com >> Karabiner-Elements
groups.google.com/forums/ osx-karabiner
KeyRemap4MacBook
Entry: For PC Users -> Change PC Application Key -> Application Key to Option_L
Unfortunately the latest macOS Sierra doesn't support Karabiner yet. An easy solution is to convert capslock key with command key.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Recently I installed Ubuntu and I've some troubles with typing text on terminal, the problems not occurs on the text editors. I can't select the text to right or left using shift+arrow. When I try it, like shift+left, D letter is typed on the line, and C is typed using shortcut with arrow right. Resuming, I've two issues:
Select text with shift+arrow not working;
Select all text with shift+home or shift+end
I installed KDE on Ubuntu. Please, anyone can help me?
The standard Terminal does not use the same shortcuts (or even the same cursor behavior) as you might expect in a browser or text editor window. The shift key by itself does not select text that way. shift+home will scroll to the top, shift+end to the bottom, and using it with pg up/pg down will scroll up/down one screen. The arrow keys are mapped to A/B/C/D.
As you can see on this list, most of the commands are for moving around and managing processes. I usually just select text with the mouse, then copy with ctrl+shift+c and paste with ctrl+shift+v. As discussed on Ask Ubuntu, there appears to be no easy way to select arbitrary text without the mouse.
Alternative terminal programs may offer more options.
Update While this is not a standard shortcut, you can go into Terminal's Edit > Preferences > Shortcuts, find the Edit section, click the Select All row in the Shortcut Key column, then enter a new shortcut like ctrl+shift+a. This new shortcut will then let you then copy all of the terminal text.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
It seems I'm unable to comment out blocks of code in Android Studio using the CTRL + SHIFT + 7 (on my Lenovo Yoga 2 Pro there's no Numpad and hence no / character on its own button).
Pressing the above combination creates a bookmark with the number 7 instead.
Does anyone know a workaround or am I just stuck with /* *\?
The problem is that the binding is to the main character on the key, which on your keyboard is 7, not /. As I commented before, you might want to try if pressing the Ctrl- works (that is the location of / on my US International keyboard).
Otherwise, I'd suggest you map it to another combination. I don't have Android Studio, but in IntelliJ IDEA (which has the same foundation as Android Studio) this can be configured under File, Settings, Keymap (Main Menu > Code > Comment with Line Comment) or just search for line comment.
Here is the / key on your Yoga 2 Pro Keyboard.
You can usually comment code by using Ctrl-/ or Ctrl-Shift-/
I will assume you have a keyboard driver installed that matches your keyboard.
The lowest symbol on left is the one you normally get when you press the key without also pressing any modifier key.
The symbol above that is the one you normally get when you press that key simultaneously with the Shift key.
The symbol to the right is the one you normally get when you press that key simultaneously with the Alt Gr (it is the Alt key on right hand side) key.
If you are talking about a laptop, and the third symbol is in an a different colour from the other marks on the key, usually in blue, then it is usually obtainable by pressing that key simultaneously with the FN key. See this link .
Example
In UK laptop keyboards we generally have three symbols on key 4 which are normally $ on top, 4 on bottom left and € on bottom right.
Only pressing 4 will simply print 4.
Pressing Shift + 4 will print $.
Pressing Alt Gr + 4 will pring €.
NOTE: All of the above is written with assumption that you have the proper keyboard drivers installed on your pc/laptop.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I recognize that Up/Down will give you the command history. But, how do you look at past output by scrolling up and down?
I have used Shift+Page Up/Page Down, Alt+Shift+Up/Down and Page Up/Page Down but none of these seem to work.
It is a Redhat Linux box.
SHIFT+Page Up and SHIFT+Page Down. If it doesn't work try this and then it should:
Go the terminal program, and make sure
Edit/Profile Preferences/Scrolling/Scrollback/Unlimited
is checked.
The exact location of this option might be somewhere different though, I see that you are using Redhat.
Shift+Fn+ UP or DOWN on a Macbook will allow you to scroll.
Alternative: you can use the less command.
Type in console:
"your_command" | less
This will allow you to scroll with the up and down arrow keys.
Basically your output has been piped with the less command.
ALTERNATIVE FOR LINE-BY-LINE SCROLLING
Ctrl + Shift + Up Arrow or Down Arrow
Unlike Shift + Page Up or Page Down, which scrolls the entire page, this will help with a smoother line-by-line scrolling, which is exactly what I was looking for.
SHIFT + Page Up and SHIFT + Page Down are the correct keys to operate on the linux (virtual) console, but vmware console doesn't have those terminal settings. The virtual console has fixed scroll back size, it sounds like it's limited to video memory size according to this Linux virtual console Scrolling behavior documentation.
Another alternative, that might be already installed on your system is to use GNU screen :
# This starts screen which adds basic window management in terminals
screen
# This starts the copy mode you can use to scroll
<CTRL-A> [
# Now use the arrows to scroll
# To exit copy mode, do
<ESC>
See man screen for much more useful options (multiple windows, ...)...
Shift Pageup/End works for me.
It seems as though this is not easily possible: The Arch Linux Wiki lists no way to do this on the console (while easily possible on the virtual terminal).
You could use tmux scrolling:
Ctrl-b then [ then you can use your normal navigation keys to scroll around (eg. Up Arrow or PgDn). Press q to quit scroll mode.
Alternatively you can press Ctrl-b PgUp to go directly into copy mode and scroll one page up (which is what it sounds like you will want most of the time)
VM Ubuntu on a Mac...fn + shift + up/down arrows
I ran into the same problem with VMWare workstation with Ubuntu guest, turns out VmWare doesn't support scrolling back up from the server view. What I did was to install x GUI, then run xterm from there. For some reason it runs the same, but lets you scroll the normal ways. Hope this helps future readers in VmWare virtual boxes.
In some VPS hostings (like linode) you have to click Ctrl+A and then ESC. Exit with double ESC too.
Fn + Up/Down can scroll Terminal in Mac OS X 10.11
Press the Shift key when scrolling the mouse up/down works for me when loggin in Ubuntu using Terminal ssh in Yosemite.
PERSISTENT, longterm solution
Add this line to your ~/.screenrc
termcapinfo xterm* ti#:te#
Now you can create a screen, and scroll it up/down with your mouse;
Like you normally do.
For some commands, such as mtr + (plus) and - (minus) work to scroll up and down.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
Is there an editor in Linux that can highlight all instances of a word when the word is double-clicked? I was using Notepad++ in Windows which provided that feature. Now I am missing it in Linux editors. I tried Kate, Gedit, etc.
To enable this feature in Geany do the following:
Install the addons plugin: sudo apt-get install geany-plugin-addons
In Geany, click on Tools -> Plugin Manager
enable the plugin Addons (check in the column Active)
configure the plugin by clicking on Preferences
enable the option Mark all occurrences of a word when double-clicking it
First install the addons plugin:
sudo apt-get install geany-plugin-addons
and then apply the answer of mr13.
What version of Kate where you using, Kate has that exact feature as described here.
This Geany addon didn't work for me (on Fedora), rather this one did: http://sourceforge.net/projects/geanyhighlightselectedword/. Though installing it was a bit complicated.
Summary
Eclipse has something similar. Install the Darkest Dark plugin, then double-click a word and press Ctrl + F to highlight all instances. Press Esc to unhighlight.
Both Sublime Text 3 and 4 and Microsoft Visual Studio Code (VSCode) have the double-click feature. Just double-click any word to highlight all instances of it. Click away anywhere to unhighlight.
Details
The top 3 modern, Linux-compatible editors which come to my mind when I think about software development are the following. All 3 of them are powerful, modern, widely-used, and cross-platform (Windows, Mac, and Linux)!
Eclipse
free and open source software (FOSS), and no-cost, but very heavy.
My go-to and primary editor for professional and hobby software development because it's got an outstanding, world-class indexer which allows you to Ctrl + Click on any variable or function name to jump to its definition.
Links to my full setup documentation are found here.
Sublime Text 3 and 4
proprietary/closed-source shareware, a professional and very powerful and very light-weight tool, no-cost for an unlimited full-access trial period, and relatively low-cost for a license
My primary editor for individual files--I frequently edit the same file at the same time with both Eclipse and Sublime Text 3 and 4, since Sublime has wonderful multi-cursor support for simultaneous editing of multiple lines all at once! I also have Eclipse set as my git editor of choice (see my answer here: How do I make git use the editor of my choice for commits?)
Learn to use it with this live, interactive tutorial-style "plugin": https://sublimetutor.com/.
Microsoft Visual Studio Code (VSCode)
free and open source source (FOSS) source code, and no-cost; minor caveat: technically, the binaries distributed by Microsoft are freeware, though the source code is free and open source
One of the industry's most popular editors today, but also a relatively new entry into the field. I haven't used it much yet.
So, let's see how each of these 3 can "highlight all instances of a selected word":
1. Eclipse
If you install the plugin Darkest Dark Theme with DevStyle, you get the following features:
Just place your cursor on any variable and it automatically highlights all instances of this variable, like this. Here you can see _currentChannel_i highlighted in black in 4 places, and in some yellowish color in one place near the bottom-left:
[MY FAVORITE] Double-click any word to highlight it, then press Ctrl + F to highlight all instances of it! Use the buttons in the find bar in the top-right (also shown circled below) to choose "Case sensitive search" and/or "Match whole word" as desired too. You can also choose "Regular expression search". Here you can see 8 instances of _currentChannel_i all highlighted in blue, including some in the comments! I use love this feature and use it all the time! Press Esc to cancel the Ctrl + F blue highlighting.
See here for links to my full setup documentation.
2. Sublime Text 3 and 4.
From here, if I'm doing some fancy multi-cursor editing, I like to right-click the screen and go to "EasyShell" --> "Open with default Application" to open up this same file in Sublime Text 3 or 4.
In Sublime Text 3 and 4, you simply double-click any word to highlight all instances. That looks like this. Here, I have double-clicked _currentChannel_i, and you can see 9 instances of it highlighted/boxed, including in the comments. Simply click away anywhere to undo this selection.
Note that you can also highlight a word and then press Ctrl + D repeatedly to highlight instances of it, one-at-a-time, each with a new cursor. This is handy when editing all instances of a variable in a single file all at once, for quick-editing/refactoring, rather than using the Ctrl + H Find and Replace tool.
3. Microsoft Visual Studio Code (VSCode)
This one is super easy too! Just double-click any word to highlight all instances of it--same as Sublime Text 3 and 4. Click away anywhere to undo this selection. Here, I have double-clicked _currentChannel_i, and you can see 9 instances of it highlighted, including in the comments.
So, which editor to use?
Well, Sublime Text is the lightest, by far, but lacks a good indexer and function view/explorer. It has advanced, modern features like multi-cursor mode. It is made by one lone and very-talented developer, so if you use it, please go buy a license to support his work. That's his livelihood.
Eclipse is the heaviest, by far, but lacks modern features like multi-cursor mode. It is the oldest of the 3, by far, and has a world-class indexer. Since it is the oldest (first released in 2001) and FOSS, it is widespread and is used as the base for many other professional editors and microcontroller development platforms, such as the STM32CubeIDE, and the Arduino Professional IDE, both of which are Eclipse-based. For that reason alone, it is worth learning.
Microsoft VSCode is the newest (first released in 2015), and is more light-weight than Eclipse and more-advanced and feature-rich than Sublime Text. Since it came after the other 2 editors, it was able to borrow ideas from Sublime Text (I'm supposing), such as multi-cursor mode, which is ingenious. Therefore, it contains that feature (see here: https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor), as well as a powerful indexer (which I can't comment on since I haven't used it), and an "OUTLINE" view in the left-hand pane to view a list of functions, definitions, etc., like I can see in the "Outline" view in Eclipse in the right-hand pane. Since it is backed by Microsoft, it is arguably the best-supported of the 3.
Since I am most-familiar with Eclipse, I prefer it in conjunction with Sublime Text. If you are brand-new to these editors, however, I recommend you just start with Microsoft VSCode and go from there. Optionally, try out my Eclipse installation and configuration instructions above if you ever find yourself needing or wanting to use Eclipse directly, or STM32CubeIDE or the Arduino Pro IDE.
VIM can do this:)Not by clicking, but there is a way to quickly search for a word and highlight all occurrences.
Check this out:
http://vim.wikia.com/wiki/VimTip14
There's Geany, but I don't know if it does that.
You could customize gedit to do much of what you want:
http://grigio.org/pimp_my_gedit_was_textmate_linux
If you can't get what you want, you could install Notepad++ with WINE. Try something like this.
In Linux Mint 19 Tara
Install geany-plugin-automark, then start geany, go to
Menu -> Tools -> Plugin Manager and Enable/check Auto-mark
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
The community reviewed whether to reopen this question 7 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am using RealVNC viewer on Windows. I sometimes find it very difficult to shift from VNC to Windows. I have to use F8 -> Minimize and then Alt + Tab. I wish I had more flexibility. Can the following key combinations be somehow enabled?
Win + D -> I see my Windows desktop.
Alt + Tab switches between VNC and Windows applications.
Ctrl + Tab switches between VNC subwindows.
I found two solutions:
1 (from: http://www.realvnc.com/products/viewerplus/1.0/docs/af1069655.html)
Configuring your keyboard
By default, and with the exception of CTRL-ALT-DELETE and the function
key used to open the shortcut menu, key presses affect the host
computer and not the client. To reverse this behavior for the
application-level keys listed below, turn off Pass special keys
directly to VNC Server. Note this property is on the Inputs tab.
Affected keys/combinations: WINDOWS (also known as START), PRINT
SCREEN, ALT-TAB, ALT-ESCAPE, CTRL-ESCAPE.
2 (from: http://www.physnet.uni-hamburg.de/physnet/vnc/winvncviewer.html)
Keystrokes such as Ctrl-Esc and Alt-Tab may be interpreted at the
local (viewer) machine. If you want to send them to the remote
machine, you can use the options on the viewer menu to send individual
Ctrl-down, Ctrl-up, Alt-down and Alt-up keystrokes. For example, to
type Ctrl-Esc on the remote machine, send Ctrl-down using the menu,
press Esc, and then send Ctrl-up (or just tap the Ctrl key) to release
the Ctrl key at the remote end.
I am running the Gnome Desktop on the VNC Server, so I followed these steps to implement the two solutions recommended by user1403360:
Turn off Viewer -> Options -> Inputs -> "Pass special keys directly to VNC Server" (i.e. parameter SendSpecialKeys=FALSE)
Alt+Tab will now switch between Windows applications
In Gnome Desktop -> Preferences -> KeyboardShortcuts, change "Move between windows using a popup window" => Ctrl+Tab
Ctrl+Tab will now switch between VNC sub-windows