Frequently Asked Questions

CTRL-X, CTRL-C, CTRL-V in Text Fields

Question:

How do I enable cut, copy, and paste keyboard shortcuts in my text fields?

Answer:

Flash does not support cut, copy, and paste keyboard shortcuts in text fields when playing in "windowless" mode. To see this problem in the browser, publish your fla to HTML with the wmode set to "transparent windowless".

You can remedy this issue in mProjector by adding a key listener and using mProjector's mSystem.setClipboard() and mSystem.getClipboard() commands.

Sample Files

Code Snippet:

your_text_field.restrict = "= — - * ~ , ) ( % $ § + ' | _ & ? / : . @ - A-Z a-z 0-9  x16 ^"

Key_listen = new Object();
Key_listen.onKeyDown = function(evt) {
keyCode = Key.getCode();
if (Key.isDown(Key.CONTROL)) {
my_field = eval(Selection.getFocus());
var my_text:String = my_field.text;
if (Key.getCode() == 118 || Key.getCode()== 86) {
// V or v
my_text = mSystem.getClipboard();
my_field.text = my_text;
bug = true;
}
if (Key.getCode() == 99 || Key.getCode() == 67) {
// C or c
mSystem.setClipboard(my_text);
}
if (Key.getCode() == 88 || Key.getCode() == 120) {
// X or x
mSystem.setClipboard(my_text);
my_field.text = "";
}
}
};
Key.addListener(Key_listen);


If you have additional questions or have ideas on how to improve an FAQ, contact us. Please include a link to the FAQ in your email.

Home Buy mProjector SCREENTIME Forums Support About