Isn't there a way to turn off all midi nots as a sort of "Panic Button"?
The simplest form sends MIDI control change 123 (CC123) which is supposed to stop all notes of a sound modul. Maybe your keyboard has such a panic function, I don't know. If the keyboard is programmable, it may allow you to make a panic button yourself. Just set a button or key to send Control Change 123. It can also be done in the Logic Environment and triggered by any MIDI event.
Since not all modules respond to CC123 properly, there is another method which sends a note-off event for each note on each channel. This means 128*16=2048 MIDI events in a row, which takes a little while. This is used by some software and hardware because it works 100% with every sound module and software. Normally not possible with keyboards but can be done in the Logic Environment.
The most sophisticated method is what Tangra uses in his special Environment tools and which is also implemented in MIDI programming software like Max/MSP. The incoming note-on and note-off events get stored and you can send note-offs to all notes which haven't received their's yet. Very effective, fast and economic, but you need a lot of knowledge to program such a function in the Logic Environment.
---
However, beside several technical possibilities to get note-offs under control, bear in mind that clean playing is "key number 1" for a good performance. Killing notes is a rescue technique and even the best musicians need it from time to time but normally - unless you do complex experimental music - you should be able to play without this help. If you find yourself killing notes all the time because of octave shifts, you should definitely consider to get a longer keyboard.
Maybe worth to mention:
A MIDI hang is not always bad. The so called "hold function" provided by some instruments uses hangs for layering. It works well for sounds with a long decay or release time. You play a note or a chord, call the "hold" function (or switch octave or channel), and continue playing over the hanging notes. Later you can kill the hanging notes by note-offs and with the right sound nobody hears how and when you managed to remove the underlying sound. Even different sounds can be played this way, it's classic MIDI layering.