You can check before firing the event if the text area is in focus.
$("textarea").is(":focus");
To extend your code:
$(document).on('keydown', function(e){
if (e.which == 37 && !$("textarea").is(":focus")) {
mySwiper.swipePrev();
}
if (e.which == 39 && !$("textarea").is(":focus")) {
mySwiper.swipeNext();
}
});