How to add custom keyboard shortcut for terminal in apple macbook pro - macos

I don't think there is any pre-defined keyboard shortcut for opening terminal in macbook pro. I am about to start bash so really need to call up terminal fast. Can't use spotlight every time & then write Terminal their and call it. I just bought mac so i am getting familiar with all the custom keyboard shortcuts. I searched a lot on google but i couldn't find a way to add shortcut. I was using Linux Distro's before. Adding terminal shortcut is pretty easy in linux. In some distro's its predefined with ctrl+T key. Please let me know the easy way. Thanks in advance.

I recommend using iterm2 or total terminal.
You can use control + ' to bring down a terminal whenever you need it.

Related

mac magic keyboard on windows in intellij key binding

I have been using intellij on mac for the last 4 years, now using windows temporarily, and expect to return to mac soon.
I bought a magic keyboard for my windows machine so I wouldnt have to (re)learn 2 sets of keyboard shortcuts, and i switched intellij layout to mac default, but this does not work as I expected. The mac keyboard is pretending to be a windows keyboard rather than just being a mac keyboard.
Is there a simple way to tell the magic keyboard to just be a mac keyboard? I want all keyboard shortcuts to be exactly the same.
Ive googled this for a bit but found nothing helpful.
I looked into microsoft keyboard layout creator, but it appears the windows key will always be a windows key, and windows will never see a command or option key. This may be a viable solution, but looks like a time suck, and I'd like to know if anybody has suggestions before I go down this route any further.
Thanks for your help
Try making Windows key to act as Meta:
Press Help | Edit Custom Properties... (if a dialog appears, press "Create")
"idea.properties" file will open. Add keymap.windows.as.meta=true to a new line
Restart IDE

How to manipulate OSX Lion desktop spaces in Terminal

I'm specifically hoping to find out if there is a way to create a new Mission Control desktop space using the Terminal, or even using Automator.
My apologies if this is a trivial question. I'm fairly new to using the Terminal and I've been googling things having to do with Terminal manipulation of desktop spaces/Mission Control to no avail.

How to create a Windows application that: detects current program and sends shortcuts

I would like to create an application for Windows that is visible in the system tray and can detect the current open window. The application that I want to make should also be able to "press on the users keyboard": sending out keyboard shortcuts to the current open window/application.
How would I go about doing this? What programming languages/tools would be useful?
Best would even be if it is portable to Mac, but this is not a must.
Portability: Not very likely you can find anything that is cross-platform for this.
For Windows: AutoIt. Does everything you want and a lot more.
For Mac: Applescript (standard component of OSX) can probably do this, but I could be wrong about that. I do have a Mac, but I never had a reason to play around with this sort of stuff.

Synergy between mac and pc change mac hotkeys

Synergy is a program that enables you to use the same mouse and keyboard in two computers. I have a PC and mac connected directly with an Ethernet cable therefore the connection is great and it seems as if there is only one computer.
I am developing an iPad application and the only software that I have found that supports iwebkit for CSS is Expresso. I use that to edit my CSS files in the mac and I use dream weaver on my PC to edit PHP, HTML and JavaScript files. The only problem is that I am constantly using both computers to develop the application and its very frustrating using different shortcut keys for each computer. It would be very nice if I could use the same hot-keys on both computers.
So far I have tried:
Changing the modifier keys in the keyboard section under system preferences in the mac. That works but just with the keyboard from the mac not with the keyboard that I am using with synergy that controls both computers.
Creating applescripts that what they do is to send a shortcut key then compiling them and saving them as an application. After they are saved as an application I go to system preferences and try to run them with a different shortcut key. when I create that shortcut key system preferences crashes and closes without saving the changes.
Creating shortcut keys in synergy which it works but only in one computer. Synergy will always send the same keystroke regardless on which computer you are using.
Lastly I have tried looking for "IronAHK" which in a lot of posts people say it modifies the mac hotkeys but I have not been able to find it for the mac.
Is there a way to have the same universal access keys across my machines?
THe following article was very helpful for me (working from a Mac, controlling a PC):
http://www.nextofwindows.com/how-to-properly-map-keyboard-between-mac-and-pc-when-share-mouses-with-synergy/
Step 1: Configure Server
Step 2: Double-click on the PC (or Mac if the Server is a PC)
Step 3: Toggle the key Ctrl and Super to mirror each other
When adding a new computer in synergy you can change command and control keys. Here is an example in windows. I was not able to find it because synergy place this in a location where I never thought I could find it.
Now I can use control + c to copy files both in the mac and in the pc and most of the command such as control + a to select everything etc. To fix the other issues so that I can use 'home' to go to the beginning of the line for example I use the program provided by Evan Moran which was the first answer in this post.
For the mac I use KeyRemap4MacBook. It is pretty good for being free.
That said, consider using different source editors so that you can code only on one system. This will make your life a ton easier. Dreamweaver is not necessarily the best. Visual Studio is pretty good on Javascript, CSS, and HTML, and their express versions are free.
If all you need is syntax highlighting EditPlus is great on the PC and will work on all languages you mentioned. If you need to stay on a mac then TextWrangler is great as a basic source editor. Both have free trials. Good luck!

Better terminal in Mac OS X -- reversing the control and command key-mappings

I'm trying to have the same KDE Konsole experience within Mac OS X.
Here's my (overly complicated?) setup:
I have Control and Command swapped at the System Preferences level. (Can't live without this)
Parallels lets you, at the Parallels application level, also reverse Control and Command. So I can undo the System Preferences setting (and get the setup I want within virtual Linux)
I want this same per-application-opt-out for the Mac OS X Terminal app. Is it possible?
The solution you're looking for is KeyRemap4MacBook. There is a Tiger, Leopard, Snow Leopard, and Lion version.
Once installed, goto System Preferences -> KeyRemap4MacBook
Then select the following options:
Change Command_L Key (Left Command)
---> Command_L to Control_L (except Terminal, Virtual Machine, RDC)
Change Control_L Key (Left Control)
---> Control_L to Command_L (except Terminal, Virtual Machine, RDC)
You can repeat this for Command_R (Right Command) and Control_R (Right Control) also if you desire. Tested and working on my Macbook.
You can simply ssh into the Linux/Unix system and run X11 programs direct to your Mac screen: ssh -X user#host_or_ipaddress, login, and just run the X11 programs you want (e.g. emacs&) and the X11 apps will appear on the Mac display.
Pros:
X11 windows work just like any other window, including Exposé goodness, etc...
No need to work only inside the Parallels console window
Same solution works with any Linux/Unix system, remote or virtual
ssh connection is secure even over the internet
Tech info:
"ssh -X" turns on X11 forwarding for the ssh connection, i.e. the X11 display connection is tunneled through ssh securely
"ssh -X" also handles X11 authentication tunneling
X11.app is automagically started on OSX by launchd when needed
X11 can connect to displays over the network, which is one of the few cool things about it ;-)
There is very good and key-mapping flexible terminal: iTerm2
My favorite set: iTerm + zsh + oh-my-zsh
The 2016 solution is to use Karabiner open-source program which allows you to remap modifier and other keys with very fine granularity, for example
Remap only the left ⌘ Cmd or Option key.
Remap a key only for specific applications, e.g. only inside Terminal, Emacs, or virtual machine.
For example, here's how to remap left ⌘ Cmd key to act as Ctrl only inside Terminal (and leave the right one unaffected so that you could still use e.g. ⌘ Cmd + Tab to switch between apps):
You can customize the command keys used for an individual application in System Preferences > Keyboard & Mouse > Keyboard Shortcuts. I think (if I understand correctly what you're trying to do) that this might allow you to accomplish your goal. You could remap all of Terminal's command keys to use control instead of command, to get them out of your way... but then you might need to do a lot of customization on the machines you ssh into, so that they use Command instead of control
It seems that you're going to have to do an ENORMOUS amount of work just to allow you to use your pinky instead of your thumb for the modifier key.
Another possibility: user preferences can be manipulated by the "defaults" command. I haven't been able to find a way to use this to control they modifier key mappings, but it should logically be possible (if you're willing to do a lot of digging). If so, then you could write short scripts to switch back and forth between Mac default and your swapped mode. Trigger the scripts with Quicksilver, and whenever you use Terminal you can call one script, and whenever you leave it you can call another. Again, a big pain to achieve what you want, but it might be possible.
I don't think there's a clean and simple solution.
I've seen third-party programs that give more control over manipulating modifier keys, if you're willing to install them (probably kernel extensions). They might be able to do what you want, but I don't recall the names. If you google for programs to fix emacs and vi keys you might find them.
Good luck.
I had exactly the same problem as you. I've remapped Command to CAPS Lock, and Control to Command, but as a frequent Linux user I want both setups to be as similar as possible. This is how I solved it:
Install Keyboard Maestro (not free, but totally worth it), and set it up to run at login.
Inside KM, define macros to send CMD+{key} to CTRL+{key} inside Terminal.
If you want to remap a lot of keys this is a lot of work. But I've already done it myself, you can just download this file kmmacros. Double-clicking is enough to install it. A couple of caveats:
You need to set Terminal to use option as a meta key (Terminal > Preferences > Keyboard).
The bindings are only for emacs-mode. This cheat sheet should be helpful.
Most default shortcuts don't work anymore (CMD-N, CMD-C, ...), and the menu in Terminal does not reflect this. For some conflicts (New Window, Close Window), I've taken the ones from Gnome.

Resources