[GH-ISSUE #201] Cmd/Option key swapping for MacOSX. #164

Closed
opened 2026-05-05 05:28:23 -06:00 by gitea-mirror · 13 comments
Owner

Originally created by @memecode on GitHub (Dec 17, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/201

Operating Systems

Server: Windows 10
Client: MacOSX 10.13.4

Barrier Version

2.1.0 on both machines

Steps to reproduce bug

Normally I would use 'Alt' on the windows keyboard as the Command ⌘ key. And apparently you can map it to do that using the .conf file. By default the windows key maps to command and alt maps to option.

So what I'd like to see is that there is options to map the windows key -> option, and the alt key to command in the user interface. But failing that I need to be able to find the barrier.conf file to edit it directly. Currently it's location is not discoverable by new users. Sure it says "configuration file" in the UI for the server but that file doesn't exist on my mac client... so where is it saving my client specific settings? The man page is not installed and reading the code seems to indicate "~/barrier.conf".

However if I view the log I get this:
[2018-12-18T10:49:18] INFO: starting client
[2018-12-18T10:49:18] INFO: config file: /var/folders/f1/4dbtx98n2mg737sn2y0v3vpw0000gr/T/Barrier.eWezhq
[2018-12-18T10:49:18] INFO: log level: INFO

It seems to be auto-generating new config file paths every time I run it. I've spent far too long trying to edit the config to fix the keys.

Other info

This isn't a show stopper but it's pretty annoying to have to manually adjust to different modifier keys to use for copy and paste...

Originally created by @memecode on GitHub (Dec 17, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/201 ### Operating Systems ### Server: Windows 10 Client: MacOSX 10.13.4 ### Barrier Version ### 2.1.0 on both machines ### Steps to reproduce bug ### Normally I would use 'Alt' on the windows keyboard as the Command ⌘ key. And apparently you can map it to do that [using the .conf file](https://gist.github.com/wpiekutowski/1259289). By default the windows key maps to command and alt maps to option. So what I'd like to see is that there is options to map the windows key -> option, and the alt key to command in the user interface. But failing that I need to be able to find the barrier.conf file to edit it directly. Currently it's location is not discoverable by new users. Sure it says "configuration file" in the UI for the server but that file doesn't exist on my mac client... so where is it saving my client specific settings? The man page is not installed and reading the code seems to indicate "~/barrier.conf". However if I view the log I get this: [2018-12-18T10:49:18] INFO: starting client [2018-12-18T10:49:18] INFO: config file: /var/folders/f1/4dbtx98n2mg737sn2y0v3vpw0000gr/T/Barrier.eWezhq [2018-12-18T10:49:18] INFO: log level: INFO It seems to be auto-generating new config file paths every time I run it. I've spent far too long trying to edit the config to fix the keys. ### Other info ### This isn't a show stopper but it's pretty annoying to have to manually adjust to different modifier keys to use for copy and paste...
Author
Owner

@AdrianKoshka commented on GitHub (Dec 18, 2018):

Is this what you're looking for? (alc.localdomain is the client)

2018-12-17-190156_439x437_scrot

<!-- gh-comment-id:448045669 --> @AdrianKoshka commented on GitHub (Dec 18, 2018): Is this what you're looking for? (alc.localdomain is the client) ![2018-12-17-190156_439x437_scrot](https://user-images.githubusercontent.com/8690255/50123335-4a4fb680-022e-11e9-95d7-a3c63d2b9ed2.png)
Author
Owner

@AdrianKoshka commented on GitHub (Dec 18, 2018):

fwiw, every machine has this UI dialogue: (This is the server)

2018-12-17-190331_439x437_scrot

can be found by double-clicking any of the machines in the configure server dialogue:

2018-12-17-190323_795x534_scrot

<!-- gh-comment-id:448046051 --> @AdrianKoshka commented on GitHub (Dec 18, 2018): fwiw, every machine has this UI dialogue: (This is the server) ![2018-12-17-190331_439x437_scrot](https://user-images.githubusercontent.com/8690255/50123401-8420bd00-022e-11e9-9576-4218a928b5c2.png) can be found by double-clicking any of the machines in the configure server dialogue: ![2018-12-17-190323_795x534_scrot](https://user-images.githubusercontent.com/8690255/50123436-9bf84100-022e-11e9-817a-e17134c6980b.png)
Author
Owner

@memecode commented on GitHub (Dec 18, 2018):

Is this what you're looking for? (alc.localdomain is the client)

2018-12-17-190156_439x437_scrot

Yes that is what I need. It's just difficult to find because I was expecting it to be on the client side.

The discoverable version of this is a menu option on the client like File->Screen Settings or something that brings up that dialog on the client side (or any side really... just for the local machine, be it client or server). Is that something that would be acceptable to add? Like if I submit a patch what is the likely hood of it being accepted?

<!-- gh-comment-id:448047891 --> @memecode commented on GitHub (Dec 18, 2018): > > > Is this what you're looking for? (alc.localdomain is the client) > > ![2018-12-17-190156_439x437_scrot](https://user-images.githubusercontent.com/8690255/50123335-4a4fb680-022e-11e9-95d7-a3c63d2b9ed2.png) Yes that is what I need. It's just difficult to find because I was expecting it to be on the client side. The discoverable version of this is a menu option on the client like File->Screen Settings or something that brings up that dialog on the client side (or any side really... just for the local machine, be it client or server). Is that something that would be acceptable to add? Like if I submit a patch what is the likely hood of it being accepted?
Author
Owner

@memecode commented on GitHub (Dec 18, 2018):

Actually one option would be to merge the "settings" dialog and the "screen settings" dialog so that everything is in one place. The fact that there are 2 different sets of settings isn't obvious to new users. I found the "settings" easily enough but it didn't let me edit the key modifier mappings.

<!-- gh-comment-id:448048242 --> @memecode commented on GitHub (Dec 18, 2018): Actually one option would be to merge the "settings" dialog and the "screen settings" dialog so that everything is in one place. The fact that there are 2 different sets of settings isn't obvious to new users. I found the "settings" easily enough but it didn't let me edit the key modifier mappings.
Author
Owner

@AdrianKoshka commented on GitHub (Dec 18, 2018):

I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though?

<!-- gh-comment-id:448073145 --> @AdrianKoshka commented on GitHub (Dec 18, 2018): I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though?
Author
Owner

@memecode commented on GitHub (Dec 18, 2018):

I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though?

Yes I got it working how I want now. This is what I ended up with:
settings

<!-- gh-comment-id:448074872 --> @memecode commented on GitHub (Dec 18, 2018): > I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though? Yes I got it working how I want now. This is what I ended up with: ![settings](https://i.imgur.com/KAtdF0c.png)
Author
Owner

@harshhpareek commented on GitHub (Aug 3, 2020):

@AdrianKoshka I had some trouble finding this. It deserves to be on the main FAQ page.

<!-- gh-comment-id:667783420 --> @harshhpareek commented on GitHub (Aug 3, 2020): @AdrianKoshka I had some trouble finding this. It deserves to be on the main FAQ page.
Author
Owner

@LaszloGombos commented on GitHub (Oct 30, 2020):

Change will only take affect after stop/start the server (reload config does not seem to be enough).

<!-- gh-comment-id:719150782 --> @LaszloGombos commented on GitHub (Oct 30, 2020): Change will only take affect after stop/start the server (reload config does not seem to be enough).
Author
Owner

@amanjeev commented on GitHub (Nov 4, 2021):

image

This is my setup to make this work. I had to leave super as is and turn off ctrl because scrolling on mac client would end up zooming in and out instead of scrolling. So the other solutions in this discussion did not work for me.

server - ubuntu
client - macos
barrier version 2.3.3

<!-- gh-comment-id:961326564 --> @amanjeev commented on GitHub (Nov 4, 2021): ![image](https://user-images.githubusercontent.com/160476/140401684-17c13dbd-dd3f-42df-98a9-9a7cd95641e7.png) This is my setup to make this work. I had to leave super as is and turn off ctrl because scrolling on mac client would end up zooming in and out instead of scrolling. So the other solutions in this discussion did not work for me. server - ubuntu client - macos barrier version 2.3.3
Author
Owner

@matiasbaldanza commented on GitHub (Jan 21, 2022):

I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though?

Yes I got it working how I want now. This is what I ended up with: settings

This solved my issue perfectly. Thanks!

<!-- gh-comment-id:1018547504 --> @matiasbaldanza commented on GitHub (Jan 21, 2022): > > I admit it's not perfect, it's something we inherited from synergy. Did this solve your issue though? > > Yes I got it working how I want now. This is what I ended up with: ![settings](https://camo.githubusercontent.com/76b39ecf721426b1b7cf599257ad67334b00e5c3e3fa41056f908ac42a4991ae/68747470733a2f2f692e696d6775722e636f6d2f4b4174644630632e706e67) This solved my issue perfectly. Thanks!
Author
Owner

@QuantumGrizzly commented on GitHub (May 17, 2022):

I spent today about an hour experimenting with karabiner-elements to remap my keyboard keys to mac without success. And the config in Barrier is exactly what I needed. Thank you for asking the question in this issue and for people to provide the screenshots of the settings. You saved me so much time.

<!-- gh-comment-id:1128438857 --> @QuantumGrizzly commented on GitHub (May 17, 2022): I spent today about an hour experimenting with karabiner-elements to remap my keyboard keys to mac without success. And the config in Barrier is exactly what I needed. Thank you for asking the question in this issue and for people to provide the screenshots of the settings. You saved me so much time.
Author
Owner

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

I spent today about an hour experimenting with karabiner-elements to remap my keyboard keys to mac without success. And the config in Barrier is exactly what I needed. Thank you for asking the question in this issue and for people to provide the screenshots of the settings. You saved me so much time.

Same, I tried messing up with Modifier keys and Karabiner and these settings were all there.

<!-- gh-comment-id:1201095936 --> @Fauzdar1 commented on GitHub (Aug 1, 2022): > I spent today about an hour experimenting with karabiner-elements to remap my keyboard keys to mac without success. And the config in Barrier is exactly what I needed. Thank you for asking the question in this issue and for people to provide the screenshots of the settings. You saved me so much time. Same, I tried messing up with Modifier keys and Karabiner and these settings were all there.
Author
Owner

@ezorzin commented on GitHub (Sep 14, 2023):

Hi, I have a Mac (italian layout) as server and Windows 10 as client.
If on the Mac I type "<" or ">" then nothing is typed on Windows.
Moreover, if I type backtick on mac = ALT+\ (on the italian layout) nothing happens on Windows.
I can type "[" and "]" by typing CTRL+ALT+è and CTRL+ALT++ (the last + is the + key) and have it translated as ALTGR+è and ALTGR++ on Windows.

How can I type "<", ">" and backtick?

I tried all is written here, nothing worked for me.

Thanks

<!-- gh-comment-id:1719284946 --> @ezorzin commented on GitHub (Sep 14, 2023): Hi, I have a Mac (italian layout) as server and Windows 10 as client. If on the Mac I type "<" or ">" then nothing is typed on Windows. Moreover, if I type backtick on mac = ALT+\ (on the italian layout) nothing happens on Windows. I can type "[" and "]" by typing CTRL+ALT+è and CTRL+ALT++ (the last + is the + key) and have it translated as ALTGR+è and ALTGR++ on Windows. How can I type "<", ">" and backtick? I tried all is written here, nothing worked for me. Thanks
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#164
No description provided.