[GH-ISSUE #1163] Trying to make a hotkey for Ctrl to Cmd on PC|Mac build. #935

Closed
opened 2026-05-05 07:18:07 -06:00 by gitea-mirror · 12 comments
Owner

Originally created by @Uzukii on GitHub (May 14, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1163

I want to be able to copy and paste in Mac OS with the same keys you do in Windows (Ctrl+C, Ctrl+V). The problem is Mac uses Cmd+C, Cmd+V and Windows doesn't have a Cmd key. It has the Win key in it's place. And the Win key can't be used as a modifier key in Barrier. So I can't make a Ctrl = Win or Ctrl+C, Ctrl+V = Cmd(Win)+C, Cmd(Win)+V hotkey.

Originally created by @Uzukii on GitHub (May 14, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1163 I want to be able to copy and paste in Mac OS with the same keys you do in Windows (Ctrl+C, Ctrl+V). The problem is Mac uses Cmd+C, Cmd+V and Windows doesn't have a Cmd key. It has the Win key in it's place. And the Win key can't be used as a modifier key in Barrier. So I can't make a Ctrl = Win or Ctrl+C, Ctrl+V = Cmd(Win)+C, Cmd(Win)+V hotkey.
Author
Owner

@serek2298 commented on GitHub (May 20, 2021):

Its working this way by deafult in my case. Simply enable clipboard sharing.

<!-- gh-comment-id:844906154 --> @serek2298 commented on GitHub (May 20, 2021): Its working this way by deafult in my case. Simply enable clipboard sharing.
Author
Owner

@Uzukii commented on GitHub (May 20, 2021):

There's clipboard sharing and then there's the convenience of being able to use the same physical key presses on the keyboard for Mac OS and Windows. I want to be able to press Ctrl+C and V in Mac OS to copy and paste, rather than Win+C and V. Same goes for other hotkeys like Ctrl+A for select all.

<!-- gh-comment-id:845249718 --> @Uzukii commented on GitHub (May 20, 2021): There's clipboard sharing and then there's the convenience of being able to use the same physical key presses on the keyboard for Mac OS and Windows. I want to be able to press Ctrl+C and V in Mac OS to copy and paste, rather than Win+C and V. Same goes for other hotkeys like Ctrl+A for select all.
Author
Owner

@lededev commented on GitHub (May 20, 2021):

You need read wiki.
https://github.com/debauchee/barrier/wiki/Command-Line#server_config

shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen.

<!-- gh-comment-id:845286148 --> @lededev commented on GitHub (May 20, 2021): You need read wiki. https://github.com/debauchee/barrier/wiki/Command-Line#server_config shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen.
Author
Owner

@Uzukii commented on GitHub (May 20, 2021):

You need read wiki.
https://github.com/debauchee/barrier/wiki/Command-Line#server_config

shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen.

Sorry, but I don't know what I'm looking at here. Where in the wiki does it tell you how to map the Ctrl key to the Cmd ⌘ key in Mac OS?

I know there's a way to remap keys in Mac OS itself but that doesn't work with keyboards connected through Barrier.

<!-- gh-comment-id:845507911 --> @Uzukii commented on GitHub (May 20, 2021): > You need read wiki. > https://github.com/debauchee/barrier/wiki/Command-Line#server_config > > shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen. Sorry, but I don't know what I'm looking at here. Where in the wiki does it tell you how to map the Ctrl key to the Cmd ⌘ key in Mac OS? I know there's a way to remap keys in Mac OS itself but that doesn't work with keyboards connected through Barrier.
Author
Owner

@jbg commented on GitHub (Jun 2, 2021):

@Uzukii just below the section linked to above you will find https://github.com/debauchee/barrier/wiki/Command-Line#screen-options which shows how to solve your problem. "shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen" -- I believe the cmd/windows key is meta but try it out and see.

<!-- gh-comment-id:852687573 --> @jbg commented on GitHub (Jun 2, 2021): @Uzukii just below the section linked to above you will find https://github.com/debauchee/barrier/wiki/Command-Line#screen-options which shows how to solve your problem. "shift, ctrl, alt, altgr, meta, and super allow these keys to be mapped to a different key for that screen" -- I believe the cmd/windows key is `meta` but try it out and see.
Author
Owner

@owlwoopyto commented on GitHub (Nov 9, 2021):

@Uzukii I had this same question. In the server configuration settings, for my Mac client I set the Ctrl: modifier key to Super. Now when I press Ctrl+C on my keyboard, it copies text on the Mac. Hope this helps.

<!-- gh-comment-id:964514113 --> @owlwoopyto commented on GitHub (Nov 9, 2021): @Uzukii I had this same question. In the server configuration settings, for my Mac client I set the Ctrl: modifier key to Super. Now when I press Ctrl+C on my keyboard, it copies text on the Mac. Hope this helps.
Author
Owner

@YiannisDermitzakis commented on GitHub (Nov 10, 2021):

@Uzukii
You need to create a configuration file and set the remapping there. What @owlwoopyto suggests is something like:

# C:/Users/<your-user>/barrier.sgc

section: screens
    WindowsPc:
    MacBook-Pro.local:
        # this maps ctrl on the Windows keyboard to super (=command) on the Mac
        ctrl = super
end
section: links
    WindowsPc:
        right = MacBook-Pro.local
    MacBook-Pro.local:
        left = WindowsPc
end
<!-- gh-comment-id:964793691 --> @YiannisDermitzakis commented on GitHub (Nov 10, 2021): @Uzukii You need to create a configuration file and set the remapping there. What @owlwoopyto suggests is something like: ``` # C:/Users/<your-user>/barrier.sgc section: screens WindowsPc: MacBook-Pro.local: # this maps ctrl on the Windows keyboard to super (=command) on the Mac ctrl = super end section: links WindowsPc: right = MacBook-Pro.local MacBook-Pro.local: left = WindowsPc end ```
Author
Owner

@Uzukii commented on GitHub (Nov 11, 2021):

@Uzukii I had this same question. In the server configuration settings, for my Mac client I set the Ctrl: modifier key to Super. Now when I press Ctrl+C on my keyboard, it copies text on the Mac. Hope this helps.

@Uzukii You need to create a configuration file and set the remapping there. What @owlwoopyto suggests is something like:

# C:/Users/<your-user>/barrier.sgc

section: screens
    WindowsPc:
    MacBook-Pro.local:
        # this maps ctrl on the Windows keyboard to super (=command) on the Mac
        ctrl = super
end
section: links
    WindowsPc:
        right = MacBook-Pro.local
    MacBook-Pro.local:
        left = WindowsPc
end

I can't believe this. When I read owlwoopyto comment I didn't know what he was talking about. It wasn't until after I read YiannisDermitzakis comment about making a configuration file that I realized something. You can double click the icons under the Screens and links tab in the Configure Server window.. facepalm It's the same as making a configuration file. Thanks guys. I'm going to go bang my head against a wall now.

<!-- gh-comment-id:966516274 --> @Uzukii commented on GitHub (Nov 11, 2021): > @Uzukii I had this same question. In the server configuration settings, for my Mac client I set the Ctrl: modifier key to Super. Now when I press Ctrl+C on my keyboard, it copies text on the Mac. Hope this helps. > @Uzukii You need to create a configuration file and set the remapping there. What @owlwoopyto suggests is something like: > > ``` > # C:/Users/<your-user>/barrier.sgc > > section: screens > WindowsPc: > MacBook-Pro.local: > # this maps ctrl on the Windows keyboard to super (=command) on the Mac > ctrl = super > end > section: links > WindowsPc: > right = MacBook-Pro.local > MacBook-Pro.local: > left = WindowsPc > end > ``` I can't believe this. When I read owlwoopyto comment I didn't know what he was talking about. It wasn't until after I read YiannisDermitzakis comment about making a configuration file that I realized something. You can **double click** the icons under the Screens and links tab in the Configure Server window.. *facepalm* It's the same as making a configuration file. Thanks guys. I'm going to go bang my head against a wall now.
Author
Owner

@Fauzdar1 commented on GitHub (Aug 1, 2022):

Strange Enough, with custom config, Client never starts and stuck on Starting in Mac, it works without custom config. Seems like I've to suffer with this Ctrl Command mess.

<!-- gh-comment-id:1201050752 --> @Fauzdar1 commented on GitHub (Aug 1, 2022): > Strange Enough, with custom config, Client never starts and stuck on Starting in Mac, it works without custom config. Seems like I've to suffer with this Ctrl Command mess.
Author
Owner

@Camble commented on GitHub (Nov 22, 2022):

@Fauzdar1 You can change the modifier keys without creating a custom config file. Just open the screen settings in the GUI and select from the dropdowns.

<!-- gh-comment-id:1323354081 --> @Camble commented on GitHub (Nov 22, 2022): @Fauzdar1 You can change the modifier keys without creating a custom config file. Just open the screen settings in the GUI and select from the dropdowns.
Author
Owner

@MMShep97 commented on GitHub (Mar 6, 2025):

I'd like to link this comment on a related issue on mapping windows -> mac keys as I spent more than I would've preferred searching for this: https://github.com/debauchee/barrier/issues/201#issuecomment-448074872

<!-- gh-comment-id:2702776911 --> @MMShep97 commented on GitHub (Mar 6, 2025): I'd like to link this comment on a related issue on mapping windows -> mac keys as I spent more than I would've preferred searching for this: https://github.com/debauchee/barrier/issues/201#issuecomment-448074872
Author
Owner

@nbolton commented on GitHub (Mar 7, 2025):

Please try Deskflow or Input Leap as Barrier is no longer in development.

https://github.com/deskflow/deskflow
https://github.com/input-leap/input-leap

Both are compatible with Barrier client/server so you can try on one of your computers.

If this is still an issue in those projects, we would appreciate a cross-post of this issue.

<!-- gh-comment-id:2706017229 --> @nbolton commented on GitHub (Mar 7, 2025): Please try Deskflow or Input Leap as Barrier is no longer in development. https://github.com/deskflow/deskflow https://github.com/input-leap/input-leap Both are compatible with Barrier client/server so you can try on one of your computers. If this is still an issue in those projects, we would appreciate a cross-post of this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#935
No description provided.