LyX
Install a New Package on MacOS X Lion
First install the package where TeX can find it. Normally you put it in ~/Library/. On Lion Library is hidden so you need to unhide it first.
chflags nohidden ~/Library/
cd ~/Library/
mkdir texmf
mkdir texmf/tex
mkdir texmf/tex/latex
Unpack the package (e.g. applekeys) in the latex folder.
Check that LyX can find it by checking Tools -> TeX Information. Do Rescan if needed.
To use the package in a document, the package needs to be included in preemble as well. Add the following in Documents -> Settings -> Latex Preemble and Save.
\usepackage{applekeys}
Now you can use e.g. \cmdkey (in a TeX segment) to print a apple command key.