The chords which cross staves may be produced by increasing the length of the stem in the lower stave, so it reaches the stem in the upper stave, or vice versa.
stemExtend = \once \override Stem #'length = #22
noFlag = \once \override Stem #'flag-style = #'no-flag
\context PianoStaff <<
\new Staff {
\stemDown \stemExtend
f'4
\stemExtend \noFlag
f'8
}
\new Staff {
\clef bass
a4 a8
}
>>
This page is for LilyPond-2.4.5 (stable-branch).