I have a very complex setup:
German keyboard
Windows laptop
Through VDI web client to a windows machine
To an emacs running on VDI
All tools in the Windows VDI see the correct keymap, but my emacs does not. I am not talking about key bindings (yet, that will be the next problem). I am talking about the simple keypresses: I press a z and emacs sees a y
What puzzles me is that emacs is the only tool with this problem: it seems it does not recognize the selected keymap in the windows vdi.
How can I check what keymap is active in emacs? How can I change it?
I am NOT talking about key bindings.
Related
I am using XFCE terminal in Debian linux on Apache Guacamole from MacOS X.
I'm trying to navigate between tabs in the XFCE's terminal using ALT key shortcuts (e.g. ALT+1 and ALT+2) like shown in the screen below:
I've tried every key combination I can think of, plus researched at places like this. But I haven't yet figured out the secret.
How can I issue these ALT- key combinations from my Mac keyboard in Guacamole?
Usually the modifier key ALT on a PC means "alternate" which would translate to Mac's keyboard symbology as Option (on some Macs drawn with a branching-switch icon):
Solution (when Guacamole uses realVNC)
According to realVNC (one of the possible connection protocols by Guacamole) your needed "from Mac to PC" key mapping would be:
Pressing "CmdL" (left Command key on your local Mac) will result in "AltL" (left Alt key on the remote PC/Linux)
Insightful thoughts
When using Guacamole, which probably uses VNC or XRDP protocol to connect your local client (Mac) to the remote server (Linux), the keyboard mapping has to pass 2 layers, from your local hardware/OS (Mac) to browser, over Guacamole/XRDP to the remote-system (Debian with XFCE).
All these layers can interpret the key-events triggered.
Research
Like a user of this XRDP-related forum post from MacRumors (from 2015) explains:
As below link states, Alt key of PC keyboard should be mapped as Option key on OS X. This is what we see on ARD. On XRDP Alt key behaves like Windows key and is mapped to Command key.
See also:
RealVNC Help Center: Keyboard Mapping To and From a Mac
AskDifferent: Can't get Alt (Option) key to work while remote controlling a Mac from Windows with VNC, reverse direction, but might give a clue
AskUbuntu: Remote desktop to Ubuntu has wrong keyboard mapping
Griffon's IT Library blog: XRDP – How To Make your keyboard “special keys” (Alt+Gr, Up,Down,..) working when using XRDP
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
I've recently swtiched from a Windows work PC to a Mac Book Pro. Most of my development work is done over an RDP connection to a Windows 2012 server.
When doing development work, I use IDE's and other tools that have custom keyboard shortcuts involving the Windows key. For instance, [win]+[backtick] is set to open a console. As long as I was connected to the RDP session in full-screen mode, the Windows key combinations were passed through to the RDP session and interperted correctly.
Howver, on my Mac Book Pro, I cannot trigger any of my custom Windows key shortcuts. What is weird, is that all of the built in Windows key shortcuts still work. For example. [win]+[e] opens Windows Explorer, and [win]+[d] still minimzes all windows to show the desktop. Also, pressing the Windows button by itself bring up the start menu, as normal. But none of the user assigned key combinations involving the Windows key work is any application (I've tried three apps). Custom key bindings involving the ctrl, alt, and shift keys work as expected.
Config
I'm running:
Mac Book Pro 2017
MacOS Mojave 10.14
Microsoft Remote Desktop Version 10.1
I have the "Use Mac shortcuts for cut, copy, and paste" option unchcked from within Remote Desktop Client preferences.
Based on a different question and answer, it looks like there are some configuration files in Applications --> Microsoft Remote Desktop --> Package Contents --> Contents --> Resources --> Keyboard. However, I'm not sure what I would add to map [Win]+[something].
Check this repo
Probably you can adjust this configuration file for your goals
I'm using Chrome Remote Desktop on a Windows Desktop to access an Apple iMac. I cannot figure out how to invoke the Apple Command key function from my Windows keyboard. I would think that the Windows key would work but it doesn't. Is there a way to map the Windows key to the Apple Command key? I really want to be able to invoke copy and paste from the keyboard, which are Command-C and Command-V on the iMac, so I'm stuck because I don't have a "Command" key.
My solution to this problem is to leverage the handy "Configure Key Mapping" command provided by the latest version of Chrome Remote Desktop (v. 77.0 at the time of writing). The option is available in the sidebar as shown below.
Clicking the link opens the "Configure Key Mapping" dialog, from which you can create your own mapping. An important thing to note is that the keycodes supported by Chrome Remote Desktop are not the usual "ASCII" codes to which every developer is used to (I did this error myself the first time); rather, the codes should be taken from the "UI Events KeyboardEvent code Values" W3C standard. If you go through the standard you'll find the useful "List of code values for functional keys in the Alphanumeric section" table, which I also replicate below.
Concretely, let's say you want to map your local (Windows) Ctrl key to the remote (Mac) Cmd key. From the table above we see that the code for the (left) Ctrl key is "ControlLeft", while the code for the Cmd key is "MetaLeft", so from the "Configure Key Mappings" dialog:
click "New Mapping"
enter "ControlLeft" in the "from" field
enter "MetaLeft" in the "to" field
if needed, click [New Mapping] to enter more key mappings
the configuration should now look like in the image below. Click [Done] to close the dialog window.
At this point you should be able to use Ctrl-C, Ctrl-V etc. on your local PC to trigger the corresponding Cmd-C, Cmd-V etc. commands in the remote Mac. The solution works quite well for me and it resolves a perennial problem of how to use the Cmd button while on a Windows PC without having to rely on external apps or plugins.
I'm on a Windows 10 machine remoting into an El Capitan Mac (yes, it's an old OS, but it's a 2009 model that can't be upgraded any higher). If the other solutions don't work for you (they didn't for me), you can try adding Mac keyboard shortcuts in Keyboard settings. I use this mac as a home server and only use it via Chrome Remote Desktop, so I am not worried about messing up keyboard shortcuts when using the computer's keyboard directly.
Go to Settings > Keyboard > Shortcuts > App Shortcuts and add new shortcut mappings for Copy and Paste to the Ctrl key.
On Windows 10
Alt + Window + C
Alt + Window + V
On an Acer C7, the right control key maps to command. In fact, the Search key maps to command too, which is far more helpful, but available on fewer keyboards.
Well, it seems I can use the Windows Key to send the CMD Key straight away to the Mac machine. I have tried:
Windows + C: copy
Windows + V: paste
Windows + X: Cut
Windows + W: close window
Windows + Q: close application
All work nice!
However you can't use this:
Windows + Tab: switch between applications,
it is already used by Windows for the same function.
But you can still use "holding the mouse middle wheel and moving the mouse up" to see all open applications. It is a little bit painful, but does most jobs.
If things don't work - try map MetaRight to ControlLeft
I have windows keyboard connected to a mapbook. I had to swap the modifier keys: Command <-> Control.
The problem was that when connecting with the Chrome Remote Desktop to a Linux machine, the remapping MetaLeft to ControlLeft did not work. Turned out it's because the macbook remapped the left key to the MetaRight what whatever reason.
I have confirmed, using chrome remote desktop, that search+another_key does the same as CMD+another_key while remote-connected to my mac-book pro over home WiFi. I also noted that if I want to enter two search+another_key presses sequentially, I must release and repress the search key after each instance
You can map keybindings, just not that im on a mac remoting to a windows PC (with a windows keyboard) and I noticed that MetaRight is the windows key (as oppose to Meta left).
If you want to use e.g. WIN-key + C to represent Cmd + C on mac, other than "Configure key mappings" (WIN-key seems mean Cmd on mac by default?), you need to go to full-screen checkbox by the right-side's blue-sliding bar (F11 doesn't work for me).
Only in that full-screen mode, WIN-key + something is not occupied by the Windows OS.
Go Full-Screen first
In order to use all shortcut keys, you need to go full screen from the Windows PC that is accessing the Mac. This option can be found in the side menu on the right.
Then use the ⊞ Win key for all the ⌘ Cmd key shortcut keys on Mac
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.