Peace be upon you. According to Grand Ayatollah Khamenei and Grand Ayatollah Sistani (may Allah protect them), masturbation is not limited to the use of the hand. If one engages in actions such as moving their feet or rubbing them together and reaches ejaculation, it is considered masturbation. The essence of masturbation is to perform actions that stimulate desire until ejaculation occurs. May you be successful in all good.