eject -i 1 only works a single time on Ubuntu 20.04 (focal) -- only mildly useful for those of us who accidentally hit the eject button constantly throughout the day.
Simply adding this command to the cron entry (crontab -e) such that the command runs every minute satisfied my need, although the placement of this button over the Del key will forever remain a mystery. For the record, I was NOT able to get this to disable through the Ubuntu keyboard settings.
* * * * * eject -i 1
*** EDIT ***
After upgrading to Ubuntu 21.04 (hirsute) this fix stopped working. I tried various permutations of
eject, disabling the Keyboard Shortcut and re-enabling with a cryptic keyboard sequence, and the solution of editing the rules in
/etc/udev/rules.d/60-cdrom_id.rules -- all to no avail.
The only thing that worked for me is physically disabling the drive in
.bashrc upon startup, i.e. adding this line here:
sudo rm /dev/sr0
This is actually not a terrible solution but I am still mystified why all attempts to disable this button on my Das external keyboard have been a failure. Considering that CD-ROM drives are only used on the odd occasion I still have an audio CD to burn, this is probably a decent solution for most.