Logi MX Key S Keys <> \| swapped

Discussion in 'Windows Virtual Machine' started by Ciro, Sep 17, 2023.

  1. Ciro

    Ciro Bit poster

    Messages:
    4
    The keyboard key <> and |\ is correct under macos but on windows they are swapped. I try to swap ketborad layout from (apple) ITA - Parallels to ITA (in my case) but it's not resolve the problem. I have mapped the keys in control center of parallels: key \ to < etc... but it not have success.
     
  2. LucaP8

    LucaP8 Bit poster

    Messages:
    3
    Hello, had the same issues with MX Keys (non S), same ITA layout and same keys swapped, and finally found a fix.

    If you press Fn+U for 3 seconds the keys swap back to their correct position (but mess up MacOS layout). To switch back, press Fn+U again. So you actually can use the keyboard right on both systems, but not at the same time :mad:. If you plan to use Windows for Visual Studio (as I suppose, because no normal person would use < > \ | keys ;)) that should not be an issue.

    Also found these 2 commands but no luck with Parallels issue:
    - Fn+P for 3 seconds, Windows layout
    - Fn+O for 3 seconds, MacOS layout
     
  3. Ciro

    Ciro Bit poster

    Messages:
    4
    Hello LucaP8, Thank you very much.
    Yes, i use this keys with VS and in my personal notes on coding.
    This is a best solution but how you have this information?
    There may be other useful key combinations.
     
  4. LucaP8

    LucaP8 Bit poster

    Messages:
    3
    Found here and there over the internet... There is no official documentation but the command works so far, at least there's a solution. :rolleyes:
     
  5. LucaP8

    LucaP8 Bit poster

    Messages:
    3
    HOLD ON! I think I've come to the sweet spot.

    Open Logi Options+ and deactivate "Always keep the keyboard layout Mac" (as it would interfere with next commands), then you can use:
    - Fn+P, Windows Layout, \ and < are at their place in Parallels, plus Start and Alt act as Start and Alt in Parallels
    - Fn+O, Mac Layout, \ and < are at their place in MacOs, plus Start and Alt act as Opt and Command in MacOs
    - Fn+U (after setting Mac Layout), toggle "hybrid layout" where \ and < are at their right place/swapped depending if you're using MacOs/Parallels, plus Start and Alt act as Opt and Command in MacOs, while acting as Alt and Start (yeah, swapped, instead of Alt and Start) in Parallels

    So far Fn+P it's the best option for me as the right Opt in MacOs is too far on the right, and I always use it on VS for @#[]{}. To fix this issue on MacOs layout too, add these lines into ~/Library/KeyBindings/DefaultKeyBinding.dict of your home directory (if the file does not exists, create it):
    "@$é" = ("insertText:", "{");
    "@$*" = ("insertText:", "}");
    "@è" = ("insertText:", "[");
    "@+" = ("insertText:", "]");
    "@ò" = ("insertText:", "@");
    "@à" = ("insertText:", "#");

    To fix the issues in Visual Studio Code for Mac too, too, go to Code > Settings > Key Bindings > Open keyboard shortcuts (JSON) in the upper right corner (is a sheet icon with an arrow) and replace the file content with this one (if empty, otherwise add just the array elements you need):
    [
    //aperta graffa
    {
    "key": "shift+cmd+[BracketLeft]",
    "command": "type",
    "args": {
    "text": "{"
    },
    "when": "editorTextFocus && !editorReadonly"
    },
    //chiusa graffa
    {
    "key": "shift+cmd+[BracketRight]",
    "command": "type",
    "args": {
    "text": "}"
    },
    "when": "editorTextFocus && !editorReadonly"
    },
    //aperta quadra
    {
    "key": "cmd+[BracketLeft]",
    "command": "type",
    "args": {
    "text": "["
    },
    "when": "editorTextFocus && !editorReadonly"
    },
    //chiusa quadra
    {
    "key": "cmd+[BracketRight]",
    "command": "type",
    "args": {
    "text": "]"
    },
    "when": "editorTextFocus && !editorReadonly"
    },
    //cancelletto
    {
    "key": "cmd+
     
    Ciro likes this.
  6. Ciro

    Ciro Bit poster

    Messages:
    4
    You are magnificent!
    Thank you.
     

Share This Page