Skip to content

Commit

Permalink
Ignore cariiage return (generated in HTML5 builds)
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Feb 4, 2018
1 parent 6214bcf commit e57d5e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,5 @@ See the [example app](example/) for examples of how to use Gooey on its own and
# Credits
* Assets for the Dirty Larry theme from [Dirty Larry](https://github.com/andsve/dirtylarry)
* Assets for the Kenneyblue theme from [Kenney](http://www.kenney.nl)
* Assets for the RPG theme from [Kenney](http://www.kenney.nl)
* Font Alagard used in RPG theme by [Hewett Tsoi](https://www.dafont.com/hewett-tsoi.d4888)
4 changes: 4 additions & 0 deletions gooey/gooey.lua
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ function M.input(node_id, keyboard_type, action_id, action, config)
if input.selected then
-- new raw text input
if action_id == M.TEXT then
-- ignore return key
if action.text == "\n" or action.text == "\r" then
return input
end
local hex = string.gsub(action.text,"(.)", function (c)
return string.format("%02X%s",string.byte(c), "")
end)
Expand Down

0 comments on commit e57d5e6

Please sign in to comment.