Skip to contentSkip to conversation

Detecting CDROM Eject key press

DISCUSSION Vedran Rodic 2 participants 3 messages Oct 6, 2004 – Oct 11, 2004 libata

lore
Share & tools
lore
#0 lore raw

Hello

Can I detect that CDROM Eject key has been pressed when the cdrom is mounted and the CDROM door is locked?

This, together with kernel notifying me of CDROM status changes (cdrom has media, cdrom is empty) would completely solve the cdrom automount issues.

Userspace program then could detect that the eject key has been pressed, close files on the media, and do a clean unmount.

Thanks

Vedran Rodic

#1 lore raw
Quoted 3 lines · Vedran Rodic

Can I detect that CDROM Eject key has been pressed when the cdrom is mounted and the CDROM door is locked?

I guess this is impossible, and the only way to make the eject key react every time is by disabling door locking.

Vedran

#2 lore raw
Quoted 8 lines · Vedran Rodic
Quoted 3 lines · Vedran Rodic

Can I detect that CDROM Eject key has been pressed when the cdrom is mounted and the CDROM door is locked?

I guess this is impossible, and the only way to make the eject key react every time is by disabling door locking.

Yes. If the door is locked, you don't get any notifications.

Signature · 1 line
Jens Axboe