I use stackexchange.com, which uses the same editor stackoverflow has (the editor I use now) When I try to type a special character using right alt + key (other language characters), instead of my special character I get ctrl + key shorcut, e.g. Undo (by pressing right alt + z), numbered list (by pressing right alt + o), hyperlink (by pressing right alt + l) . Is there a way to fix it? Can I disable those shortcuts or fix them so I could use right alt key in my stackexchange site?
I have found the code which handles key shortucts in script /Content/Js/wmd.js. Is it possible to override it somehow in page which include this script by ?
the "key.metaKey" is Alt key I think and it causes the problem.
var setupEditor = function() {
if (/\?noundo/.test(doc.location.href)) {
wmd.nativeUndo = true;
}
if (!wmd.nativeUndo) {
undoMgr = new wmd.undoManager(function() {
previewRefreshCallback();
setUndoRedoButtonStates();
});
}
makeSpritedButtonRow();
var keyEvent = "keydown";
if (global.isOpera) {
keyEvent = "keypress";
}
util.addEvent(inputBox, keyEvent, function(key){
// Check to see if we have a button key and, if so execute the callback.
if (key.ctrlKey || key.metaKey) {
var keyCode = key.charCode || key.keyCode;
var keyCodeStr = String.fromCharCode(keyCode).toLowerCase();
switch(keyCodeStr) {
case "b":
doClick(document.getElementById("wmd-bold-button"));
break;
case "i":
doClick(document.getElementById("wmd-italic-button"));
(.............)