Hey there, bimbaws.
There are 3 types of M.2 keys - B, M and B+M
Basically different keys have different number of pins and bandwidth lanes. The (2280) is the length and width of the drive (22mm wide and 80mm long) so that means that you should get an M key which is either 2280 or less in length (2230, 2242, 2260). Usually the larger the capacity - the longer the drive, as it needs more NAND chips.
And yes, as long as the slot says it's compatible for M.2 M-key (2280) it doesn't really matter if it's a laptop or a desktop computer's motherboard.
Here's some more info on the M.2 form factor:
https://en.wikipedia.org/wiki/M.2
Hope that helps.
Boogieman_WD