How would you translate the ‘by’ in these sentences?

“He was killed by hanging”

“He wanted to kill himself by hanging from the roof”

Some rough sentences, but it just crossed my mind and I can’t find an answer anywhere.

submitted by /u/Lass167b
[link] [comments]