# Backspace Button

**URL:** <https://forum.inductiveautomation.com/t/backspace-button/67449>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [December 9, 2022, 7:40pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449 "2022-12-09T19:40:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Hrynciw](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Robert\_Hrynciw](https://forum.inductiveautomation.com/u/Robert_Hrynciw)\
**Post date:** [December 9, 2022, 7:40pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/1 "2022-12-09T19:40:56Z")

</div>

Hello all,

I am working on creating my own On-Screen Keyboard and I have all of the buttons figured out aside from the backspace button. Does anyone know how I could make this button delete the very last character of my text field on action performed? I tried using len() and cutting it that way but that didn't seem to work as it cannot include both unicode and int.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 9, 2022, 7:48pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/2 "2022-12-09T19:48:17Z")

</div>

Maybe see how this resource works?

> **[Ignition Exchange](https://inductiveautomation.com/exchange/2380/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

Or, just use the resource. 🙂

This is another option, [Ignition Exchange | Inductive Automation](https://inductiveautomation.com/exchange/2176/overview)

---

<div class="post-metadata">

**Author:** ![Robert\_Hrynciw](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Robert\_Hrynciw](https://forum.inductiveautomation.com/u/Robert_Hrynciw)\
**Post date:** [December 9, 2022, 7:52pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/3 "2022-12-09T19:52:03Z")

</div>

Downloaded & opened and I don't see any views 🥲

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [December 9, 2022, 7:54pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/4 "2022-12-09T19:54:26Z")

</div>

Strings are iterables, so you can use slicing to achieve your purpose.

```auto
test = 'myString'
newString = test[:-1]
print newString

```

---

<div class="post-metadata">

**Author:** ![Robert\_Hrynciw](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Robert\_Hrynciw](https://forum.inductiveautomation.com/u/Robert_Hrynciw)\
**Post date:** [December 9, 2022, 7:56pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/5 "2022-12-09T19:56:30Z")

</div>

Thank you very much! I am still getting used to iterations

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 9, 2022, 8:05pm UTC](https://forum.inductiveautomation.com/t/backspace-button/67449/6 "2022-12-09T20:05:10Z")

</div>

They are there. I see you marked as solved, but I would spend the time to learn how they present resources so you will know for next time.
