The following code condition is Japanese keyboard keycode and If I change English keyboard layout it needs to work.
$('input,textarea,div#editorId').on('keydown', function(e) {
if ((e.shiftKey == false && e.keyCode == 220) || (e.shiftKey == false && e.keyCode == 226)) {
Swal.fire({
type: "info",
html: "BackSlash is not allowed",
confirmButtonClass: "btn btn-success"
})
} else if ((e.shiftKey == true && e.keyCode == 192) || (e.shiftKey == true && e.keyCode == 50) || (e.shiftKey == true && e.keyCode == 55)) {
Swal.fire({
type: "info",
html: "Double and Single Quotes are not allowed",
confirmButtonClass: "btn btn-success"
})
} else if (e.shiftKey == false && e.keyCode == 188) {
Swal.fire({
type: "info",
html: "Comma is not allowed",
confirmButtonClass: "btn btn-success"
})
}
});