symless / synergy

Synergy lets you share one mouse and keyboard between multiple computers on Windows, macOS and Linux.
https://symless.com/synergy
GNU General Public License v2.0
10.3k stars 3.64k forks source link

A letter appears on macOS clients when the spacebar is pressed #2765

Closed nbolton closed 8 years ago

nbolton commented 9 years ago

Imported issue:

Steps to reproduce:

  1. Press space key in mac osx
  2. Appears instead of the spacebar appears the key "s"

Expected: space
Actual: s

Versions (Synergy, OS):

Server: Windows 7 x64
Client 1: Mac OSX 10.6.6

nbolton commented 9 years ago

Same environment, synergy version is 1.3.6 (latest stable at 28th feb 2011).

Same behaviour. When key space is pressed, letter 's' appears in client (osx) instead of space char. Right Shift doesn't work.

nbolton commented 9 years ago

Space ' ' is mapped as 's', is impossible to write a sentence.

Server: ubuntu 10.10 - synergy 1.3.6
Client: macosx 10.6.6 - synergy 1.3.4 and also tested with synergy 1.4.2

nbolton commented 9 years ago

Server Windows 7 - Client Mac OSX 10.7 -> Space is mapped as "s"... I see that is an old bug... anyone know a way to fix this?, I was trying with hotkeys, but it didn't work :(

nbolton commented 9 years ago

Btw using Synergy 1.4.8 :)

Server Windows 7 - Client Mac OSX 10.7 -> Space is mapped as "s"... I see that is an old bug... anyone know a way to fix this?, I was trying with hotkeys, but it didn't work :(

nbolton commented 9 years ago

Same Problem here. Server Windows Xp SP3. Client OSX Mountain Lion

nbolton commented 9 years ago

Confirmed the issue with an Ubuntu Precise 12.04 as server and Mac OS X 10.7.4 as client, on both ends with Synergy 1.4.10

As workaround for space I am able to get it with ALT-SHIFT-SPACE, or ALT-SHIFT-S on the linux keyboard.

Hope the workaround helps someone.

nbolton commented 9 years ago

Confirmed.

Server : Windows 7 x86 SP1 Client : Mac OS X 10.8.1

space didnt type space char but letter "f". ALT+SPACE did type space char.

nbolton commented 9 years ago

As stated by Nito Alt+Shift+Space works. Mapped as follows:

keystroke(Space) = keystroke(Shift+Alt+Space,MAC.local)

This way it will work fine on the mac side but you will have to use Shift+Space on the server side (mine is W764).

Tryed by remapping Space on server to send Shift+Space but fails "WARNING: failed to register hotkey Space (id=0020 mask=0000)"

nbolton commented 9 years ago

Synergy 1.4.10 (server and client)

Server : Windows 7 x86 SP1 Client : Mac OS X 10.8.1

space didnt type space char but letter "f". ALT+SPACE did type space char.

nbolton commented 9 years ago

Confirmed. Synergy 1.4.10 (server and client) Server: UBUNTU 12.10 Client: Mac OS X 10.7.4

nbolton commented 9 years ago

Confirmed using Windows 7 SP1 x64 as server, using a Spanish keyboard layout, with a Macbook Pro running 10.8 as client.

nbolton commented 9 years ago

i try old version of synergy 1.3.1 (Mac) and there space work fine.

Synergy 1.3.1 (Mac client), 1.3.8 (Win server) Server : Windows 7 x86 SP1 Client : Mac OS X 10.8.2

nbolton commented 9 years ago

I have the same problem. The 'f' character appears instead of space, no combination with SHIFT,CTRL,ALT,WIN helps to me.

Server: Debian Testing (Synergy 1.4.10)
Client: Mac OS X 10.7.5 (Synergy 1.4.10)

I can provide more detailed logs if needed, here is keypress event from both server and client.


DEBUG1: send enter to "mac", 1279,389 3 2000
DEBUG1: new mask: 0x2000
DEBUG1: event: KeyPress code=65, state=0x2010
DEBUG1: onKeyDown id=32 mask=0x2000 button=0x0041
DEBUG1: send key down to "mac" id=32, mask=0x2000, button=0x0041
DEBUG1: new mask: 0x2000
DEBUG1: event: KeyRelease code=65, state=0x2010
DEBUG1: onKeyUp id=32 mask=0x2000 button=0x0041
DEBUG1: send key up to "mac" id=32, mask=0x2000, button=0x0041

DEBUG1: recv key down id=0x00000020, mask=0x2000, button=0x0041
DEBUG1: mapKey 0020 (32) with mask 2000, start state: 0000
DEBUG1: find best:  0000 2000
DEBUG1: best key index 0 of 19 (exact)
DEBUG1: found key in group 0
DEBUG1: state: 0000,0000,0000
DEBUG1: flip: 0000 (0000 vs 0000 in 0000 - 0000)
DEBUG1: desired state: 2000 0000,0000,0000
DEBUG1: flip: 0000 (0000 vs 2000 in ffff - 6020)
DEBUG1: mapped to 004, new state 0000
DEBUG1: keystrokes:
DEBUG1:   004 (00000000) down
DEBUG1: recv key up id=0x00000020, mask=0x2000, button=0x0041
DEBUG1: keystrokes:
DEBUG1:   004 (00000000) up

Some fix or workaround would be really appreciated.

nbolton commented 9 years ago

I have a workaround, with an ugly hack, at least for OS X 10.8 - Macbook Air, and only when the character is 's'

Here's the patched synergyc executable, for version 1.4.10-osx

https://dl.dropbox.com/u/38094408/synergyc

download and replace the same file in /Applications/Synergy.app/Contents/MacOS

patch:

https://dl.dropbox.com/u/38094408/patch.txt

nbolton commented 9 years ago

It's not only the problem with the space, the cmd, alt, ctrl and fn the keys don't work as expected or don't work at all.

nbolton commented 9 years ago

Synergy Premium is a very very GOOD app, but i have the same problem. We can press ALT+SHIFT+SPACE to get space bar, but is not confortable.

Server: Windows 7 Client: mac os 10.6.8

nbolton commented 9 years ago

... same problem here Client: Mac osx 10.8.2 Server: Win7 Synergy: 1.4.10 beta

nbolton commented 9 years ago

Had the same issue, found a fix by uninstalling synergy on the Win7 computer; Going to registry and deleting the synergy keys (HKCU/Software/Synergy) and reinstalling/reconfiguring. Hope it works for you guys too!

nbolton commented 9 years ago

My solution for this bug is to install as Input source the British layout and select it when using the Mac with Synergy. I simply switch the correct layout when using directly the Mac's keyboard. Make sure to have only the British layout and your real layout (in my case Italian; with more than 2 layouts sometimes the bug remains).

I'm using Synergy 1.4.10 Beta on the server (Kubuntu Linux) and on the client (OSX 10.8.3).

nbolton commented 9 years ago

solved by selecting British - PC input source but i had to reboot the mac to fix it. Running synergy-1.4.11-r1693-MacOSX107-x86_64.dmg as a client and synergy-1.4.11-r1704-Windows-x64.exe as server and btw i was getting a "z" instead of a "s" when hitting " " on the windows machine.

nbolton commented 9 years ago

19 solved the problem for me, give it a try. Thanks Lucio :)

Ubuntu 12.04 with Synergy 1.4.11 + Mac OSX 10.8.3 with Synergy 1.4.10

nbolton commented 9 years ago

19 worked ok with Mac OSX 10.7; somebody should try to solve this (spanish keyboard, Win7 server, mac osx 10.7 client)

nbolton commented 9 years ago

Same here (I get the /) on a French Canadian keyboard.
When opening the keyboard viewer, it appeared that the registered key press
on the client side is the one second down from top left (greyed on the image below).

key pressed instead of space

Mac OS X 10.7.5 - Server
Mac OS X 10.8.4 - Client

nbolton commented 9 years ago

This thing https://pqrs.org/macosx/keyremap4macbook/index.html.en called KeyRemap4MacBook (that's a mouthful aint it) has an EventViewer built-in.

This is what keyDown receives:

real Space pressed through VNC - 0x31 broken Space pressed through Synergy - 0x0 character "a" - 0x0 character "s" - 0x1 character "q" - 0xc ...

So it seems to me, that this broken Space behavior is simply due to keyDown sending a zero which usually means it isn't mapped or initialized correctly. Somewhere. Going through the source now, but it's a lot of black magic for any new codebase.

nbolton commented 9 years ago

I have a feeling this is the culprit, specifically mapKeyButtonToVirtualKey()

493                 // let system figure out character for us
494                 ref = CGEventCreateKeyboardEvent(0, mapKeyButtonToVirtualKey(
495                                                                         keystroke.m_data.m_button.m_button),
496                                                                 keystroke.m_data.m_button.m_press);

What's your feeling, Nick?

nbolton commented 9 years ago

Same issue here, I can't use the spacebar on OSX. Tried the fix as described on post #19, but after replacing with the patched file and applying chmod 775 to it, the app crashes.

nbolton commented 9 years ago

Is this Nick's homegrown issue tracker SPIT supposed to be able to send e-mail notifications on new replies? I'm not getting e-mails, is anyone else here? Maybe so many bugs go unattended because people don't know anyone else is interested?

nbolton commented 9 years ago

Same problem, version 1.4.12, server macosx 10.7.5, client macosx 10.8.4; any keyboard language combination; i press space on keyboard and it sends 'z'.

BUT INSTEAD: when the focus is on the server, if i press the 'z' key it sends a space to the client !!!!!! (with italian layout on both systems, with other layouts selected on the client it sends another key) It's quite a funny bug, but still inhibit completely the possibility of typing, which is one of the 2 central features of synergy (sharing mouse, sharing keyboard).

nbolton commented 9 years ago

Hi everyone.

I have found a workaround. When I used synergy version 1.4.8 win7 64 bit (as server) and synergy 1.3.1 mac 10.7 32 bit(as client), everything works fine.

You will need to run the synergy client manually from command line. Here is the command I used on the mac side to debug the issue:

./synergyc --name YOUR-MAC-SCREEN-NAME -f -d DEBUG 192.168.222.111 #where 192.168.... is the ip of your server

PY

nbolton commented 9 years ago

Reporting the same problem: Server Win 7, Client Mac OS X Lion. Typed space, sent "z". Impossible to write.

nbolton commented 9 years ago

FIXED SPACE BAR ISSUE = SHIFT + ALT + SPACE

Hi Everyone

I solved the space bar issue with the SHIFT+ALT+SPACE combination.

Not the {} and other issues but happy for now. Hope it helps.

nbolton commented 9 years ago

But really?after one thousand of release persist this bug? i think that synergy is the faster client-server mouse/keyboard sharing but this bug make it unusless for a mac user.

everyone knows that shift+alt+space fixed this bug, but it's very unconfortable for o writer or a developer (like me) tu do that when i have to write a lot of line code

this my conf: Server Macbook with Maveriks with last release client Macbook Air with Maveriks with last release

italian keyboard both

nbolton commented 9 years ago

Same problem. Mountain Lion on both machines, Synergy 1.4.15. PLEASE FIX!!!!

nbolton commented 9 years ago

Same annoying problem, running OSx 10.9 with W7 (server). I tried like almost every combination with different Synergy versions and nothing.

Hope this have a solution, it ruins the experience.

nbolton commented 9 years ago

Still this problem... space bar as "s"

nbolton commented 9 years ago

Hi, I had similar problem here, typing "t" letter on Win x64 server, and I got "y" on OS X Mavericks client. Everything else works. Tested on latest 1.4.xx versions.

nbolton commented 9 years ago

Wrote on a duplicate sorry but i have the same problem here on a fresh 10.9 (server+client). But i was able to use it without a bug for a few hours and i don't know if i could send yo some logs to locate when and why this happend.

nbolton commented 9 years ago

And i have a french canadian keyboard.

nbolton commented 9 years ago

Same problem with space and s letter on Windows XP or Windows 7 server and OS X Mavericks client. Version 1.4.17 on three machines.

nbolton commented 9 years ago

I forgot to mention i'm using spanish keyboard

nbolton commented 9 years ago

Server: Linux

Client: OS X 10.9.1

Synergy 1.4.17 on both

Keyboard Italian

spacebar give "z"

nbolton commented 9 years ago

Same issue on two Mac OSX 10.6.8 laptops running Synergy 1.4.17, Italian keyboard: spacebar types a 'z'.

nbolton commented 9 years ago

Server: OS X 10.9.2

Client: OS X 10.9.2

<span class="content"1.5.0 <span class=="add">1.5.1 on both

four years later with premium donation collaboration ... nothing!

Maybe synergy enterprise have solved this issue but, $79/user/year?????

nbolton commented 9 years ago

Forget my last comment, here the easy solution!

Quick Synergy

Thanks for all synergy foss

nbolton commented 9 years ago

In the spirit of open source, feel free to use Synergy forks like Quick Synergy. However you should bare in mind how out of date some of the forks are.

nbolton commented 9 years ago

I am having the same problem. Space is mapped to 's' Here is my set up:

Server. Kubuntu 14.04. 2 Keyboard Layouts. English and Spanish. The problem happens with both. Running Synergy Version 1.5.0

Client. Mac OS 10.9.4. I have tried with both layouts (English and Spanish). The problem happens with both too. Running Synergy Version 1.5.0

Thanks!

nbolton commented 9 years ago

Still persists the bug... this is really annoying :/

nbolton commented 9 years ago

For now I think you can use "ukelele" on MacOSX to fix some of the keys - but only if you can find the key that was pressed in place of the correct key and remap that.

An example:

I had ' produce $ on my OSX (Danish layout) and ALT+' resulted in "?" (Apple logo on OSX machine) http://en.wikipedia.org/wiki/U%%2BF8FF#Example_code_point_U.2BF8FF.

It should have been @.

So what I did was remap "?" which is ALT+$/ on my DK keyboard to "@" and that fixed my problem of not being able to use an at "@" because it produced an "?".

Saved the layout in /Library/Keyboard Layouts/Synergy_Hack.keylayout and use that when using Synergy :)

nbolton commented 9 years ago

Hi to everyone, On my Mac Mini with OSX 10.9 this solution work. To make space press LEFT ALT + LEFT SHIFT + SPACEBAR. in this way i make a space. Thanks :)

nbolton commented 9 years ago

same problem with "z" key.

i tried with al the solution you write here but nothing works.

server: ubuntu 14.04

client: osx 10.9.4

keyboard layout on server: IT

keyboard layout on client: IT

server software: 1.5.1

client sorfware: 1.5.1

i chaged on both more keyboard layout

i installed naughly version on both

from my test i found that the problem is on the comunication of space key code, on client the key is not found. i can make a hotkey but i i do that on the server the space not work more. its impossible to work for a developer with combination key

NO SOLUTION

you know some alternatives that works on