Replies: 2 comments 1 reply
-
I would personally not use hammerspoon to contextually control modifier keys themselves because that's not really its wheelhouse even though it may be possible to do something useful. I would use something like bettertouchtool or keyboard maestro to contextually modify how keys get mapped. I would definitely first dig into the settings inside your remote desktop application because it really should have features you can use to control how modifier keys are mapped. if all else fails i would resort to hammerspoon to apply app contextual remaps like Cmd+C into Ctrl+C for the remoter app. Sounds like it could also be that your remote desktop app may be hooking into keyboard events at a lower level and the modifications you've attempted with hammerspoon are not taking effect. Not enough details. |
Beta Was this translation helpful? Give feedback.
-
hey Stephen, I did end up getting it figured out. I to realize that hammer
spoon wasn't the app for what I was trying to do ended up finding a fix
using karabiner elements response and the thoughtful insight thank you.
…On Fri, Aug 16, 2024, 6:32 PM Steven Lu ***@***.***> wrote:
- You're clearly talking about macOS, not iOS. iOS runs on iphones
only, as even ipads run something else, which is more or less a fork of iOS
called iPadOS.
- Sounds like you're trying to set up application-specific modifier
key behavior adjustments for specific apps. I have to admit I run into
similar frustrations when whatever remote desktop solution wants to map Cmd
to Windows key which causes a lot of awkward extra window/Super keystroke
sends into the remote machine when i'm just initiating shortcuts on local
macOS.
I would personally not use hammerspoon to contextually control modifier
keys themselves because that's not really its wheelhouse even though it may
be possible to do something useful. I would use something like
bettertouchtool or keyboard maestro to do that. However I would definitely
dig into the settings inside your remote desktop application because it
really should have features you can use to control how modifier keys are
mapped.
—
Reply to this email directly, view it on GitHub
<#3630 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEMMTSGM73FF76BFMADDBMTZR2DZBAVCNFSM6AAAAABGPU6EUWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZWGM2TGMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
A little context to my situation to explain why I want to achieve what I'm asking here:
I'm a systems administrator, and our company uses iOS for our work devices (I know, such a shame). The majority of the day, I'm remoting into our client's workstations and servers. These are predominantly Windows machines. The keyboard shortcuts are a bit of a dilemma (cmd +c/v/z vs ctrl + c/v/z) because I'm copy and pasting things hundreds of times a day, and I haven't been able to find an effective way to maintain using the same keys on my work system in general, and on my work system when I'm remoted into a client's system.
I also ran into this issue with the delete key (I prefer it's functionality the way it's programmed in windows, so I've modified my configuration for hammerspoon to accomplish the same end result when remoted into a clients system and on my own work system). This solution works pretty much flawlessly and I have no issues deleting items the same way across the board. Here's the code for this functionality:
I'm attempting to sort of mimic this same concept, except for the cmd/ctrl + c/v/z keyboard shortcuts to copy, paste, and undo. The problem I'm running into is that although I've modified my iOS preferences to re-map my cmd key to my ctrl key (and vice versa), this is only effective on my machine, when I'm not remoted into a client system. When I am remoted into a windows system, the ctrl key behaves like the windows key (it's actually mapped to the cmd key), and the cmd key behaves like the ctrl key. I want my cmd key to revert back to the cmd key when I'm using the remote application (Take Control Viewer for RMM), which should be possible using appwatcher (like it is for the delete key code above). Does anyone know of a way I can accomplish this? I've tried generally swapping back the cmd and ctrl keys when the app is active, and I've tried specific key combinations, no luck with either method. Any insight would be much appreciated! Thank you!
Beta Was this translation helpful? Give feedback.
All reactions