I want to remap my keyboard to work like my Macbook Air, but I have tried and can't seem to - how do i do it?

Hi so I recently got rid of my MacOS since it was a bit broken and switched to Ubuntu. Love Ubuntu so far but I've struggled to figure out how to make my keyboard act like my old keyboard, my keyboard layout is:

my keyboard layout

I want to also make it so that to change brightness for instance I have to press the function key before the f keys (like fn+f1, fn+f2) and also to do command c and command v instead of pressing ctrl. I did see a few ways in doing this but the solutions I found weren't for the exact keyboard that I have and were slightly different and wouldn't work as intended. Generally I just want my keyboard to act like a macbook keyboard. Thanks in advance.

Still looking for a solution!


Solution 1:

The general idea about remapping keyboard layout by ready-made clothing. Luckily, Macs have a set of layouts.

sudo dpkg-reconfigure keyboard-configuration

Then you see the Macbook Pro layout, select it and determine whether the mod keys like fn+F1 works as you expected, if not, use the following methods to get what you want.

xev

This command tells you when the key or mouse button was pressed or released. Take a note of the number and identify what code is set to the key.

I will omit the brightness shortcut issue and give the link already tells better than my description, see How to change the shortcut to adjust brightness?
also Macbook Pro backlight control not working on Ubuntu 16.04

To swap the Control key and the Super(Command) key:

sudo apt install gnome-tweak-tool

Open tweak tool and Swap ctrl and super

Then your command (super_L) key is working as control_L thus you can copy and paste with the Mac-like shortcut in real keyboard, but please remember the key is no longer a super_L key, when the instruction is given e.g. use control + any key, you have to remind control key is on the left command key. Enjoy your day!