backspace

Android: Numeric key register backspace pressed

喜欢而已 提交于 2019-12-11 22:16:38
问题 I have an EditText which only accepts numeric numbers defined like this: <EditText android:id="@+id/routeInit_price" android:layout_height="wrap_content" android:layout_width="120dp" android:layout_gravity="center_horizontal" android:lines="1" android:inputType="numberDecimal"/> I am validating if there is a valid input like below to enable/disable a button. However, I doesn't receive an event on the backspace/delete button pressed event. How can I fix that? Because when the EditText is empty

Flex : button acting like a backspace

痞子三分冷 提交于 2019-12-11 09:57:10
问题 How would you make a button event call a function which acts like a backspace keyboard event delete. I tried faking the dispatch keyboard event "keyup" "keydown" with keycode 8 and keynumber 8 without success. No other way than doing it by hand with begin and end select index plus substr ? I have a textinput i just want to add a button acting like a backspace. Thanks 回答1: You can use the ASCII code 8 and translate it to a char or use the escape character '\b' or you can manipulate the

Outlook add in , text box , delete\backspace not working

本小妞迷上赌 提交于 2019-12-08 05:13:55
问题 I developed an outlook add in (custom task pane), with web browser in the user control. All the things working well beside the backspace or the delete button when I am writing something in text box in the web browser, I can't use those keys, am I missing something? 回答1: Ok I solved the problem , The problem is that the custom task pane in not always gets fucos from the outlook. So, I raised an event every time that there is "onclick" for all the pane, and then forced the pane to be in focus.

Outlook add in , text box , delete\\backspace not working

…衆ロ難τιáo~ 提交于 2019-12-08 05:06:32
I developed an outlook add in (custom task pane), with web browser in the user control. All the things working well beside the backspace or the delete button when I am writing something in text box in the web browser, I can't use those keys, am I missing something? Ok I solved the problem , The problem is that the custom task pane in not always gets fucos from the outlook. So, I raised an event every time that there is "onclick" for all the pane, and then forced the pane to be in focus. I am a few years late to the party but I managed to fix this. The easiest way to fix this is to ensure

How do I capture the backspace key in IE8 with jquery?

烂漫一生 提交于 2019-12-08 01:38:39
问题 I've got a simple javascript keydown event coded via jquery. The event should just alert the key that is "down." This works for most keys but not the backspace key in Internet Explorer. I read that IE messes this up on the keypress event but was supposed to work for the keydown and keyup events. Is there anything I can do via jquery to capture the backspace in IE? The version of IE I'm currently testing in is: 8.0.7600.16385 $('.AddressField').bind("keydown", function (e) { alert(e.keyCode);

Apply control characters to a string - Python

对着背影说爱祢 提交于 2019-12-07 07:51:27
问题 I'm trying to apply control characters, such as '\x08 \x08' that should remove the precedent char, to a string (move backwards, write space, move backwards) For example when I type into python console : s = "test\x08 \x08" print s print repr(s) I get in my terminal : tes 'test\x08 \x08' I'm looking for a function, let's says "function", that will 'apply' control characters to my string : v = function("test\x08 \x08") sys.stdout.write(v) sys.stdout.write(repr(v)) so I get a "clean", control

Catching Backspace on Chrome & Firefox is Different

偶尔善良 提交于 2019-12-07 07:43:26
问题 I am trying to make a console like application, so I am catching all the keypress on the window and do related stuff with them(not important). Problem is at backspace. I have the following code: $(window).bind("keypress",function(e){ var code = e.keyCode || e.which; if ( code == 8) { a = $("#console").html(); $("#console").html(a.substring(0,a.length-1)); currentCommand = currentCommand.substring(0,currentCommand.length-1); e.preventDefault(); } However, in Firefox, contents of the #console

Continuously delete contents of EditText on button hold Android [duplicate]

荒凉一梦 提交于 2019-12-06 13:46:35
问题 This question already has an answer here : Send backspace key event to edit text (1 answer) Closed 5 years ago . How do I delete one by one the current text of edit text when I press a button and continuously delete the text one by one when I hold the press of button. Similar to what a backspace button does. Sending a backspace event won't work on my needs because it will only work if the keyboard is active. Im not using any keyboards. 回答1: You have to use the Timer for this.It continuously

How do I capture the backspace key in IE8 with jquery?

可紊 提交于 2019-12-06 11:48:45
I've got a simple javascript keydown event coded via jquery. The event should just alert the key that is "down." This works for most keys but not the backspace key in Internet Explorer. I read that IE messes this up on the keypress event but was supposed to work for the keydown and keyup events. Is there anything I can do via jquery to capture the backspace in IE? The version of IE I'm currently testing in is: 8.0.7600.16385 $('.AddressField').bind("keydown", function (e) { alert(e.keyCode); }); use which: $('.AddressField').keypress(function(e){ alert(e.which); }); keyCode property is not

Using \\b in Python 3

╄→尐↘猪︶ㄣ 提交于 2019-12-05 18:20:58
I saw in another question that ( "\b" ) could be used to delete a character. However, when I tried \b it only put a space in between the character I was intending on deleting and the one after. Is there another way I could do backspace? (I'm trying to make a program that will write a word, delete it then rewrite a new one) bastelflp It depends on the terminal which is used and how it interprets the \b , e.g. print('Text: ABC\b\b\bXYZ') in the interactive console of PyCharm gives: Text: ABC XYZ but executed in the comand line (cmd.exe) it gives: Text: XYZ This is explained in more detail here: