A keystroke apparatus for an optical disk drive includes a computer bezel (40), an optical disk drive (10) having a keystroke (12), a pressing member (20) movably attached to the computer bezel (40) and at least one spring (30) causing the pressing member (20) to come back to an original position. The pressing member (20) has a slanted resisting portion (25) for abutting against the keystroke (12). When the pressing member (20) is pressed, the resisting portion (25) drives the keystroke (12) to open or close the optical disk drive (10).