Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grave not working on custom remote #18

Open
momar33 opened this issue May 17, 2019 · 4 comments
Open

grave not working on custom remote #18

momar33 opened this issue May 17, 2019 · 4 comments

Comments

@momar33
Copy link

momar33 commented May 17, 2019

I am making a custom remote that requires the grave key (the other character on the tilde key).

I set it to grave as found on the available keys list, but it does not work.

Here is my remote.lua code:
`local kb = libs.keyboard;

-- Documentation
-- http://www.unifiedremote.com/api

-- Keyboard Library
-- http://www.unifiedremote.com/api/libs/keyboard

--@help Full Screen
actions.fullScreen = function ()
kb.stroke("f");
end

--@help Pause
actions.pause = function ()
kb.stroke("space");
end

--@help Switch Screens
actions.switchSCreens = function ()
kb.stroke("grave");
end`

@momar33
Copy link
Author

momar33 commented May 17, 2019

So I apparently looked in the wrong section for the keys. Windows does not have a grave.

How can I set a button up to use a tilde, also how can I set a button up to use the backtick?

@groovenectar
Copy link

groovenectar commented May 17, 2019

Wow, I had always called it a backtick. TIL. I have a windows keyboard though, and it's on there?

Sorry for the shot in the dark, but does this not do it? kb.stroke("`");

@momar33
Copy link
Author

momar33 commented May 20, 2019

kb.stroke("`"); does not work.

@ghost
Copy link

ghost commented May 4, 2020

for the "tilde" or "backtick", (which.is "grave accent") instead of using
kb.stroke

Instead, use the function
kb.character

The kb.character uses the "character.keyboard" library found in unified remote, which uses UTF-8 hex coding (refer to the link at the bottom for details), but the coding is 0x60

So instead of
kb.stroke("'");

our output will be
kb.character(0x60);

Full string would look like the following:

actions.command1 = function ()
kb.character(0x60);
end


Link Ref:
keyboard.character( chr ) Reference
https://github.com/unifiedremote/Docs/blob/master/libs/keyboard.md
Unicode Reference (includes UTF-8 hex)
https://www.fileformat.info/info/unicode/char/0060/index.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants