AlynxZhou / showmethekey

Show keys you typed on screen.
https://showmethekey.alynx.one/
Apache License 2.0
329 stars 26 forks source link

Handle possible new line in device name #22

Closed XMadFoX closed 12 months ago

XMadFoX commented 1 year ago

I did helper function to replace all (or most) special characters which can cause new line in device name Not sure about structure, maybe util.c should be moved to /common or /utils directory

I'm not sure if device_name even used somewhere in GUI 🤔

21

AlynxZhou commented 1 year ago

I'm not sure if device_name even used somewhere in GUI

It's not used in GUI.

I think maybe it's better to escape \n to things like \\n, so it's still the same char in json.

And maybe just move the function into main.c, we don't use it anywhere.

Or just simply remove device_name from JSON.

XMadFoX commented 1 year ago

@AlynxZhou and do you plan to use it in GUI?

If not, well... yeah, I think it should be just removed.

AlynxZhou commented 1 year ago

@AlynxZhou and do you plan to use it in GUI?

If not, well... yeah, I think it should be just removed.

Currently No, I'll remove it, thanks.

AlynxZhou commented 12 months ago

Not a problem now.