Hey Y'all, I'm not a real dev but i did create this dev console script that blocks outlook from capturing the option key. I tried packaging it as a tampermonkey script but outlook blocked it's execution. I may still find a solution like that. but for now this is the method:
I will report back if i find a more permanent solution. cheers!
- Copy the text (included at the bottom for formatting issues)
- open the dev console by clicking option+command+i
- navigate to the console tab
- paste the copied text into the console and hit enter
here's the script:
// Create a more aggressive Alt key blocker
([removed_js] {
// Store the original addEventListener method
const originalAddEventListener = EventTarget.prototype.addEventListener;
// We'll keep track of our own handlers
const ourHandler = [removed_js] {
if (event.key === 'Alt' || event.keyCode === 18) {
console.log('Alt key intercepted');
event.stopImmediatePropagation();
event.preventDefault();
return false;
}
};
// Override the addEventListener method
EventTarget.prototype.addEventListener = [removed_js] {
// Call the original method
originalAddEventListener.call(this, type, listener, options);
// Add our own handler with capture for keyboard events
if (type.toLowerCase().includes('key')) {
originalAddEventListener.call(this, type, ourHandler, { capture: true, passive: false });
}
};
// Add our handler to existing keyboard events
document.addEventListener('keydown', ourHandler, { capture: true, passive: false });
document.addEventListener('keyup', ourHandler, { capture: true, passive: false });
window.addEventListener('keydown', ourHandler, { capture: true, passive: false });
window.addEventListener('keyup', ourHandler, { capture: true, passive: false });
// Directly handle key events on the document and window
const keyHandler = [removed_js] {
if (event.key === 'Alt' || event.keyCode === 18) {
console.log('Alt key blocked');
event.stopImmediatePropagation();
event.preventDefault();
return false;
}
};
// Force capture on document and window
document.onkeydown = keyHandler;
document.onkeyup = keyHandler;
window.onkeydown = keyHandler;
window.onkeyup = keyHandler;
console.log('Enhanced Alt key blocker activated');
})();