Git Product home page Git Product logo

petrstepanov / gnome-macos-remap Goto Github PK

View Code? Open in Web Editor NEW
477.0 477.0 42.0 227 KB

Script remaps default GNOME keyboard shortcuts to macOS standards. This provides native desktop environment feel for Mac users that are utilizing GNOME-based Linux desktop environment. Read more info about the script here: https://medium.com/@petrstepanov/a-macos-like-keyboard-remap-on-ubuntu-linux-cae1d108a97

Shell 79.19% Python 20.81%
autokey gnome keyboard-remap linux macos remap

gnome-macos-remap's People

Contributors

alexjyong avatar cstrouse avatar curiousercreative avatar misaka13514 avatar olearycrew avatar petrstepanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnome-macos-remap's Issues

Error during installation using recommended commands on Pop!_OS 21.04

When executing the installation script via sh install.sh as recommended in the readme I run into the below error. Running the script using bash works properly. This is on Pop!_OS 21.04 which symlinks sh to dash so it may only affect this distro.

casey@pop-os:~/Downloads/gnome-macos-remap$ sh install.sh 
Flipping Super and Control keys...
[sudo] password for casey: 
Copying AutoKey Phrases...
Changing default GNOME keybindings...
install.sh: 54: [[: not found

Almost there! Please do following:
1. Open 'autokey-gtk'.
   In Edit -> Preferences select 'Automatically start AutoKey at login'.
2. Restart your computer.
3. On the login screen under the gear icon on the bottom right select 'GNOME on Xorg'.
4. Enjoy!

opt+numbers addon

The only problem I had with this remap is that I can't have opt+arrows working and using opt for @ or other symbols at the same time, so I created some phrases to add to the collection. I'm using a Spanish Latin American keyboard, keep that in mind.

opt.zip

accented characters

I can't figure out how to get "é" ("option+e, e") to work... the same for `, ˜, ç and ˆ, can someone please gimme a help on that?

switching between tabs firefox/chrome

In OSX, ctrl-tab and ctrl-shift-tab cycle forward/backward over the browser tabs. Is it possible to get this with the gnome-macos-remap? It's the only snag I've found so far, since as a tab hoarder, it saves a lot of time!

ctl-s not working in terminal

This is working really well for me with everything except +s in the terminal.

I tried to create a phrase in autokey for it like the rest but it doesn't seem to work. It seems the same as the +w issue (which also doesn't work for me)

search in nano

In nano ctrl+w is search, but that closes the window, does the same happen for you?

error while installing

oefterdal@ghost:~/Downloads/gnome-macos-remap$ sh install.sh
Copying AutoKey Phrases...
Backing up /usr/share/X11/xkb/symbols/pc...
Flipping Super and Control keys...
Changing default GNOME keybindings...
./bin/install-dconf.sh: 40: [[: not found
./bin/install-dconf.sh: 41: Bad substitution

Almost there! Please do following:

  1. Open 'autokey-gtk'. Go to Edit -> Preferences.
    Select 'Automatically start AutoKey at login'.
  2. Restart your computer.
  3. On the login screen click the gear icon on the bottom right.
    Select 'GNOME on Xorg'. Login.
  4. Enjoy!

Pop!_OS. Failed to set RT scheduler: Operation not permitted

Running install.sh on popos, a warning appears with the following

Flipping Super and Control keys...
Copying AutoKey Phrases...
Changing default GNOME keybindings...

** (process:126525): WARNING **: 20:38:01.298: Failed to set RT scheduler: Operation not permitted

Is the RT scheduler warning an issue? What is the fix?

Switching Alt and Super Key

in my case for the keyboard the default install instructions result in the flipped assignment of those two letters.
Can I easily switch from e.g. Super + V to alt +V?

The keyboard used is a Microsoft Sculpt Comfort and Ubuntu 20.04 running X11.

supporting blackbox

To add support for Black Box would it be as easy as creating copies of the terminal-* files and updating the regex filters?

Screenshot?

I'm so grateful for this! Thank you. I can't figure out how to do screenshots, both of the entire screen and of just an area. ("Shift + Command + 3" and "Shift + Command + 4" Could you please advise?

I just want to say

Thanks. It's hard to undo muscle memory. You saved me the pain.

Cheers.

Logitech MX Keys Keyboard

I installed this but it is functioning weirdly and not like a mac.

In your remap, super has become the 1st key, and control has become the 2nd key.
Making it: CMD - Ctrl - Alt

This is different to a mac, where it is supposed to be:
Ctrl - Opt - CMD

Am I missing something?

Close tab vs close window

First of all thanks for this awesome script, works like a charm :)

Except, it seems like cmd+w has been mapped to "close application" rather than "close window". At least in chromium and firefox it kills the entire app, rather than just closing the tab I'm in, which is the expected behavior of cmd+w on mac OS.

Implement the emoji short cut

On macOS, control+command+space bar brings up an emoji menu that's super useful. This would be awesome in this.
Also on macOS the shortcut for a trademark symbol is option +2 if I'm not mistaken. Any way to get that implemented and similar shortcuts here?

./bin/uninstall-dconf.sh: 35: GNOME_VERSION_INT: not found

Unable to uninstall. ctr and super is still swapped.
The file /usr/share/x11/symboly/pc looks like that.

default  partial alphanumeric_keys modifier_keys
xkb_symbols "pc105" {

    key <ESC>  {	[ Escape		]	};

    // The extra key on many European keyboards:
    key <LSGT> {	[ less, greater, bar, brokenbar ] };

    // The following keys are common to all layouts.
    key <BKSL> {	[ backslash,	bar	]	};
    key <SPCE> {	[ 	 space		]	};

    include "srvr_ctrl(fkey2vt)"
    include "pc(editing)"
    include "keypad(x11)"

    key <BKSP> {	[ BackSpace, BackSpace	]	};

    key  <TAB> {	[ Tab,	ISO_Left_Tab	]	};
    key <RTRN> {	[ Return		]	};

    key <CAPS> {	[ Caps_Lock		]	};
    key <NMLK> {	[ Num_Lock 		]	};

    key <LFSH> {	[ Shift_L		]	};
    key <LCTL> {	[ Control_L		]	};
    key <LWIN> {	[ Super_L		]	};

    key <RTSH> {	[ Shift_R		]	};
    key <RCTL> {	[ Control_R		]	};
    key <RWIN> {	[ Super_R		]	};
    key <MENU> {	[ Menu			]	};

    // Beginning of modifier mappings.
    modifier_map Shift  { Shift_L, Shift_R };
    modifier_map Lock   { Caps_Lock };
    modifier_map Control{ Control_L, Control_R };
    modifier_map Mod2   { Num_Lock };
    modifier_map Mod4   { Super_L, Super_R };

    // Fake keys for virtual<->real modifiers mapping:
    key <LVL3> {	[ ISO_Level3_Shift	]	};
    key <MDSW> {	[ Mode_switch 		]	};
    modifier_map Mod5   { <LVL3>, <MDSW> };

    key <ALT>  {	[ NoSymbol, Alt_L	]	};
    include "altwin(meta_alt)"

    key <META> {	[ NoSymbol, Meta_L	]	};
    modifier_map Mod1   { <META> };

    key <SUPR> {	[ NoSymbol, Super_L	]	};
    modifier_map Mod4   { <SUPR> };

    key <HYPR> {	[ NoSymbol, Hyper_L	]	};
    modifier_map Mod4   { <HYPR> };
    // End of modifier mappings.

    key <OUTP> { [ XF86Display ] };
    key <KITG> { [ XF86KbdLightOnOff ] };
    key <KIDN> { [ XF86KbdBrightnessDown ] };
    key <KIUP> { [ XF86KbdBrightnessUp ] };
};

hidden partial alphanumeric_keys
xkb_symbols "editing" {
    key <PRSC> {
	type= "PC_ALT_LEVEL2",
	symbols[Group1]= [ Print, Sys_Req ]
    };
    key <SCLK> {	[  Scroll_Lock		]	};
    key <PAUS> {
	type= "PC_CONTROL_LEVEL2",
	symbols[Group1]= [ Pause, Break ]
    };
    key  <INS> {	[  Insert		]	};
    key <HOME> {	[  Home			]	};
    key <PGUP> {	[  Prior		]	};
    key <DELE> {	[  Delete		]	};
    key  <END> {	[  End			]	};
    key <PGDN> {	[  Next			]	};

    key   <UP> {	[  Up			]	};
    key <LEFT> {	[  Left			]	};
    key <DOWN> {	[  Down			]	};
    key <RGHT> {	[  Right		]	};
};

Not working on Ubuntu

This is Awesome! However, I just ran through the steps including restarting and changing the system to X11.

However, I don't see any changes.

How do I know it's working?

ctrl commands not working in terminal

Hi,

I am using Ubuntu 22.04. The cmd options seem to be working and the ctrl options seem to be working outside of the terminal. However, I am not able to do things such as ctrl + C, ctrl + K, etc in the terminal.

how to use this for non apple keyboards

Hello!
so this is not really an issue, this project is the only concrete attempt in simplifying the usage of Linux for ppl that [got used to / still are using] a mac
well done!

one thing I am finding difficult to understand is: now that the beloved CMD is mapped to SUPER(aka win key) in linux terminology, perfect for an apple Keyboard of course;
...but how should I go to use this in those keyboards were the first key on the left of the space bar is ALT ? muscle memory is always hitting ALT+C / ALT+V for a copy and paste
thanks

I cant uninstall

I installed with install.sh and something happened i dont want.
I run the uninstall.sh file and reboot the os, nothing changed. my windows button changed with CTRL button and i cant reverse it.
Please help, thanks

Alt+Backspace deletes the word

On macOS, when I press Alt+Backspace, the word gets deleted. How can I add this?

PS: Nice repo and thanks for the work done.

Cannot uninstall

I installed this, but i couldnt use ctrl, so i tried to go back. Now, super and ctrl are both mapped to ctrl and i can’t fix it. What should I do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.