Giter VIP home page Giter VIP logo

daskeyboard.io's Introduction

Das Keyboard Q Documentation Website

This is the source files repo for https://www.daskeyboard.io.

Build Status Services Health

Issues, bugs, and requests

We welcome contributions and feedback. Please file a request in our issue tracker and we'll take a look.

Dev env installation

A TLDR version follows:

  1. Ensure you have Ruby installed; you need version 2.2.2 or later:
    • ruby --version
  2. Ensure you have Bundler installed; if not install with:
    • gem install bundler -v 2.0.1
  3. Install all dependencies:
    • bundle install

If you see this error:

ERROR: Failed to build gem native extension

then you'll need change your ruby version by using (with X.X version asked in error message):

sudo apt-get install rubyX.X-dev

If you see nokogiri installation error, make sure you got required dependencices:

    sudo apt-get install libxslt-dev libxml2-dev

View Site in dev mode

 bundle exec jekyll serve

or

jekyll serve -w --force_polling

Testing

rake checklinks

IMPORTANT Need to run the website in another process

Some form of broken links prevention is done automatically by rake checklinks on every commit (through tool/travis.sh). But this will not see any Firebase redirects (rake checklinks does not run the Firebase server) and it will not check incoming links.

Before we can move the more complete automated linkcheck solution from dartlang.org, we recommend manually running the following.

  • First time setup:

    pub global activate linkcheck npm install -g superstatic

  • Start the localhost Firebase server:

    superstatic --port 3474

  • Run the link checker:

    linkcheck :3474

Even better, to check that old URLs are correctly redirected:

linkcheck :3474 --input tool/sitemap.txt

Automatic deployment

Merge your work on branch deploy, and push it.

You need to make sure than the tests pass.

We have set up Travis to deploy on commit on the git branch deploy.

Manual deployment

Generate static site:

bundle exec jekyll build # build goes to ./_site

Deploy to Firebase hosting

firebase deploy -p ./_site

Adding next/previous page links

If you have a document that spans multiple pages, you can add next and previous page links to make navigating these pages easier. It involves adding some information to the front matter of each page, and including some HTML.

---
layout: tutorial
title: "Constraints"

permalink: /tutorials/layout/constraints.html
prev-page: /tutorials/layout/properties.html
prev-page-title: "Container Properties"
next-page: /tutorials/layout/create.html
next-page-title: "Create a Layout"
---

{% include prev-next-nav.html %}

{:toc}

<!-- PAGE CONTENT -->

{% include prev-next-nav.html %}

Omit the "prev-page" info for the first page, and the "next-page" info for the last page.

Syntax highlighting

The website uses prism.js for syntax highlighting. This section covers how to use syntax highlighting, and how to update our syntax highlighter for new languages.

Supported languages

This website can syntax highlight the following languages:

  • shell
  • dart
  • html
  • css
  • javascript
  • java
  • objectivec
  • swift
  • go
  • php
  • python
  • ruby

Using syntax highlighting

The easiest way to syntax highlight a block of code is to wrap it with triple backticks followed by the language.

Here's an example:

class SomeCode {
  String name;
}

See the list of supported languages above for what to use following the first triple backticks.

Adding more languages for syntax highlighting

The website uses a custom build of prism, which includes only the languages the website requires. To improve load times and user experience, we do not support every language that prism supports.

To add a new language for syntax highlighting, you will need to generate a new copy of the prism.js file.

Follow these steps to generate a new copy of prism.js:

  • Open js/prism.js
  • Copy the URL in the comment of the first line of the file
  • Paste it into a browser window/tab
  • Add the new language that you wish to syntax highlight
  • DO NOT change the other plugins, languages, or settings
  • Download the generated JavaScript, and use it to replace js/prism.js
  • Download the generated CSS, and use it to replace _sass/_prism.scss

Including a region of a file

You can include a specific range of lines from a file:

{% include includelines filename=PATH start=INT count=INT %}

PATH must be inside of _include. If you are including source code, place that code into _include/code to follow our convention.

daskeyboard.io's People

Contributors

baptisteamato avatar camilleblrt avatar camillebqt avatar chris13524 avatar dependabot[bot] avatar drockney avatar fabiendv avatar freddiehaddad avatar fredericlefeurmou avatar ghennion avatar hex87 avatar jfrmilner avatar mojo-ivaylo avatar mubramaj avatar octo avatar phlak avatar rogueoverride avatar supercobra avatar wedge206 avatar willtung-daskeyboard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

daskeyboard.io's Issues

Issue with 4Q connecting in Q-software

Having issues with my 4Q that refuses to connect to the Q-software, without having to reboot the computer.....

If I click back and forth to the dashboard-page a few times a Q5 is listed as "disconnected" (I've never owned a Q5 in my life though.

This is really frustrating. Do you have a fix planned for this?
Unplugging\replugging the USB-cables doesn't make any difference. The only thing that SOMETIMES helps is rebooting the entire computer.
It will then work until the next time the computer goes into hibernation\sleep, and you'll have to repeat the process again.

OAuth 2.0 requires TLS

I noticed that it's possible to authenticate against the OAuth token endpoint via HTTP. According to the OAuth RFC, authorization servers MUST require the use of TLS.

Since requests to the token endpoint result in the transmission of
clear-text credentials (in the HTTP request and response), the
authorization server MUST require the use of TLS as described in
Section 1.6 when sending requests to the token endpoint.

5Q locks up daily. Must be unplugged and replugged.

When the device locks up, no keys work and usually there are a few keys still backlit, but most are dark.

Running latest firmware which stated that it fixed intermittent reboots. I had those reboots prior to the firmware, but I still get the USB disconnect/reconnect sounds from time to time.

I attempted to use USBLogView to see what is causing the issue but it doesn't log the disconnects consistently.

Also, the built in logs (quio.log and quio1.log) are both over a month old.

OAuth 2.0 incompatibilities

Since there are quite a few incompatibilities between the OAuth 2.0 spec and the Q API, I've decided to list them in one issue rather than create one for each. Some of these are major and some are minor, but in order to be OAuth compliant, they all need to be addressed.

Requirements

  • Servers MUST support HTTP Basic authentication for client_id and client_secret. However, this is not required (nor supported) for the username and password parameters used with the password grant type. See 2.3.1 and #2.
  • Authorization endpoints MUST require a response_type parameter with a value of code or token. See 3.3.1.
  • Servers MUST support application/x-www-form-urlencoded POST bodies for some of its endpoints. See 4.1.3, 4.3.2, 4.4.2, 6, and #2.
  • Servers MUST require a redirect_uri parameter when accepting requests with the authorization_code grant type. The value of the redirect_uri parameter MUST match the one used in the authorization request. See 4.1.3.
  • The password grant type requires a username parameter. This API uses email instead. See 4.3.2.
  • Servers MUST include a token_type parameter when granting a token. See 5.1.
  • Servers MUST respond with an error parameter when it cannot, or refuses to, issue an access token. See 5.2.

I created a test suite to track these requirements. The status of tests can be viewed on Travis CI. The tests are ran daily.

Build Status

Recommendations

  • Clients SHOULD be required to use redirect endpoints secured with TLS (i.e. HTTPS). Loopback URLs are exempt from this as stated in RFC 8252. See 3.1.2.1.
  • Clients SHOULD be required to register their redirect endpoints before using them. This prevents attackers from exploiting open redirectors. See 3.1.2.2.

The desktop app listens on all IP addresses

The desktop app listens on 0.0.0.0, which means it listens on all IP addresses. This is a security issue because anyone on the same network can read and write your signals without authenticating (unless you have a firewall properly configured). These signals may contain sensitive information.

An option should be provided to choose the listen IP address. One of those options should be 127.0.0.1 (localhost). When using 127.0.0.1, only apps running on your computer will have access to the local API. It is also recommended to make 127.0.0.1 the default setting.

I originally posted this on the forum.

Client credentials should be authenticated where possible

Client credentials (client_id and client_secret) can be used to obtain an access token, but beyond that, they aren't used for authentication. The purpose of OAuth client credentials is to authenticate third party services like IFTTT and Zapier, not to authenticate end users.

According to the OAuth RFC, client credentials are used for:

  • Enforcing the binding of refresh tokens and authorization codes to
    the client they were issued to. Client authentication is critical
    when an authorization code is transmitted to the redirection
    endpoint over an insecure channel or when the redirection URI has
    not been registered in full.
  • Recovering from a compromised client by disabling the client or
    changing its credentials, thus preventing an attacker from abusing
    stolen refresh tokens. Changing a single set of client
    credentials is significantly faster than revoking an entire set of
    refresh tokens.
  • Implementing authentication management best practices, which
    require periodic credential rotation. Rotation of an entire set
    of refresh tokens can be challenging, while rotation of a single
    set of client credentials is significantly easier.

Note that this only applies to confidential clients like web applications that communicate with the Q API on the server backend over secure channels (i.e. not in a user's browser). They must be required to register their redirect URIs, and they should be required to use HTTPS. I'm not sure if you require IFTTT and Zapier to do that at this point.

Public clients, like mobile apps, desktop apps, or browser apps, that communicate to the Q API directly (not through a proxy web application as described earlier) should not be required to authenticate, nor should they even be given a client_secret, since they cannot securely store it. Also, they should only be allowed to use loopback redirect URIs.

End users have no need for client credentials, and giving a set to them by default can lead to confusion on how to use the API, especially when the client credentials are tied to their personal account rather than an app they are developing. End users can just use their username and password to authenticate against the API rather than having two sets of credentials that do the same thing.

On second thought, the password grant type should probably be disabled, but that's best described in another issue.

In conclusion, if you're not going to authenticate client credentials, then there's no need to have client_secrets at all.

Issue opening Q Desktop after 2.0.0-7 update

Windows 10 x64
beta 2.0.0-7 software
DasKeyboard 5Q

The Q desktop app never loads, just a blank screen. Keyboard colors are no longer working on the keyboard (probably because the service/app are hung).

Upon rebooting the computer, colors will work during shutdown, but when computer comes back online they go dark again. seems like maybe something in the app is hung and doesn't fix until it is killed on shutdown

Doesn't recognize keyboard

das-keyboard-q says disconnected forever until I restart the pc. Than it works till the next time the computer goes to sleep/hibernate.

I have a 4Q with the latest firmware and q software.

No user friendly way to revoke clients

I have not found a user friendly way to revoke access from a client application, like IFTTT or Zapier. The only way I have found is through the API.

Are there plans to implement a web page to allow users to revoke client access?

Q software is not working

I just got my x50q and the q software is not effecting the keyboard at all. I have tried general rgb schemes as well as intalling applets and nothing changes the physical keyboard despite the dashboard representation changing as expected. What is going on?

X50Q Mac and Linux support

Are there any plans for X50Q to be supported for mac and linux? I know this is probably not the appropriate forum but if you don't plan to support it then what will I be missing out on if I'm not using the firmware. And is the support going to be a driver issue? If I run Q app in WINE, what's expected there?

EDIT: So let me ask this appropriately. I understand that Das has no plans to support, so just disregard everything I said. My question is now this: would it be possible for me to create support for X50Q or do you guys use proprietary blobs for interface?

make software working for macos

That's not really funny, I'm working with an Hackintosh and using my X50q with Windows 10 and macos mojave.
Why there isn't a support for using the RGB Software and the Dashlets within Macos??

Is it only for the 5q? I'm not ready to pay more for something that could work that way !!!

Please make the software also working for macos!!!!!

OAuth2 Mime Type Incorrect

RFC 6749, which defines the OAuth2 framework, states OAuth endpoints must accept application/x-www-form-urlencoded and may return application/json. Currently, the endpoint only accepts application/json, which makes it non-compliant with the RFC and a lot of standard library clients across varying languages.

Currently the Q Cloud authentication API doesn't work in Go with RFC-compliant, standard library client due to the incorrect mime type being accepted:

func NewClient(cid, cis string) *FiveQClient {
        // golang.org/x/oauth2/clientcredentials
	tconf := clientcredentials.Config{ 
		ClientID:     cid,
		ClientSecret: cis,
		TokenURL:     TokenPath,
	}

	c := tconf.Client(context.Background())
	return &FiveQClient{c, &Me{}}
}

// GetAuthorizedClients returns a list of AuthorizedClients which have been allowed access to the 5Q software.
func (f *FiveQClient) GetAuthorizedClients() ([]AuthorizedClients, error) {
	var ldevs []AuthorizedClients
	resp, err := f.Get(AuthorisedClients)
	if err != nil {
		return []AuthorizedClients{}, err
	}
	defer resp.Body.Close()

	decoder := json.NewDecoder(resp.Body)
	err = decoder.Decode(&ldevs)
	if err != nil {
		return []AuthorizedClients{}, nil
	}

	return ldevs, nil
}

Returns this error:

oauth2: cannot fetch token: 400 
		Response: {"code":"BAD_REQUEST","message":"Missing parameter (client_id)."}

Changing the server mime type from application/json to application/x-www-form-urlencoded should resolve the problem.

No way to register client applications

Currently the only client applications available are IFTTT and Zapier. Are there plans to allow developers to register their own client applications?

It's possible to create an account and use the Client ID at https://q.daskeyboard.com/account, but this just shows up as something like User_492 in the list of authorized clients when accessing the API.

It would be great if we could register client applications with descriptive names like Qwertydashโ„ข The dashboard for your keyboard. These clients would get their own Client IDs that would be separate from user Client IDs. (In fact, user's don't even need Client IDs and Secrets, so I don't know why we have them in the first place.)

On a side note, it would also be better to revoke clients by ID rather than by name so that longer descriptive names can be used.

Security contact information

Hello! Is there a contact address for reporting security issues? I saw that previous concerns were just opened as issues on GitHub, is that the intended venue for reporting?

I also posted this question on the forum, but figure there may be a better chance of reaching a security contact here!

Also, love the keyboards! I have two :)

Q API: Update Colors

Can the Q API include a way to update keyboard colors? I'm on a mac and I can't update the keyboard colors with the desktop app, I've got the default rainbow color scheme going. It would be nice to be able to do that over the API.

Thanks,

James

Zapier + Das Keyboard 4Q fails to recognize the right key

I've create a Zap in Zapier, where for a mention is slack, the S would 'BREATH` in magenta color.

What really happens when I test it (using Zapier's testing option) is that the right SUPER key is being lit, indeed in magenta and does have the breath effect but on the wrong key. Changing the key, changing the type of Zap or changing from 4Q to 5Q (even though I have the 4Q) does not help.

Firmware is upgraded to the latest available.

This scenario happens on Ubuntu 18.04

Can't install

Running the installer for version 2.0.3 "fails" with this message:

CreateProcess failed; code 2.
The system cannot find the file specified.

The file in question is Service Module.exe. After the installer closes, the "q" splash screen shows up for a couple seconds then crashes with no message. At this point there is no Das Keyboard service running, and manually running the service from the install directory doesn't change DasKeyboardQInstaller.exe's behavior (splash screen then crash).

No logs are generated in \AppData\Roaming\das-keyboard-q\logs.

UK layout 5Q backslash not illuminated

Just received my 5Q keyboard and it feels quite nice. The only disappointment is the key the backslash & pipe key does not illuminate. The "Das Keyboard Q" application recognises this as an American keyboard and although when hitting the keys, the correct characters are sent, it's not the case when managing key illumination through the application.

The \ & | key (second row from bottom, second key from left) is permanently un-lit and there are no options to illuminate it, or certainly non that I can find on the application.

UK layout with latest firmware 7.4.18.

I've tried setting the key colour through the shell script example and all that happened was the keys on the grid, 2,4 and 2,3 illuminated together, but my keyboard has independent 2,3 and 2,4 instead of the longer shift key.

Was so looking forward to getting this keyboard and I'm a bit miffed. Any idea on a time fix?

Thanks,
D

4Q disconnected

After reboot I am able to connect to keyboard, change its settings and add some applets, but during working day it just stops service and disconnects, so applets freeze on last state.
image

Open source the Q api and underlying software.

Is there any chance this software will ever be open source? Currently, there's a LOT of features the API is missing, batching signals, custom LED events, some way to trigger responses to events, all kinds of stuff. I'm sure you guys are working on it, but just as I'm writing open source clients to use the API, open source contributions to the underlying systems would be nice to see as well.

Issue from website page Das Keyboard Q OAuth authentication API

From URL: https://www.daskeyboard.io/q-authentication.md

Refreshing the Oauth token
curl -X POST -H "Content-Type: application/json" -d '{"client_id": "CLIENT_ID", "grant_type": "refresh_token", "refreshToken": "REFRESH_TOKEN"}' https://q.daskeyboard.com/oauth/1.4/token

Should be
curl -X POST -H "Content-Type: application/json" -d '{"client_id": "CLIENT_ID", "grant_type": "refresh_token", "refresh_token": "REFRESH_TOKEN"}' https://q.daskeyboard.com/oauth/1.4/token

daskeyboard Software on archlinux

Hey I have a problem with running the Software on archlinux. Since It is only available as a .deb file, I had to manually convert/install it. Finally, I got it running but unfortunately it doesn't recognize my device. I also tested the keyboard on my Ubuntu laptop, where it worked fine to prevent hardware or firmware issues. Are there other Archlinux users out there to help me?

Q software does not recognize Das Keyboard 5Q

As the title says, the software displays two keyboard types, both "unplugged". I'm typing this with the plugged in 5Q.

This is the case on two machines:

Windows 7 Pro, 64 bit, SP1
Q Software v1.0.0-beta.43
Latest Firmware at time of writing (firmware software detects keyboard firmware fine)

Log attached
quio.log

Firmware Update Failed

I've attempted to update my firmware to the newest several times. However, each time the keyboard flickers and cycles RGB patterns before ultimately telling me the firmware upgrade has failed.

Disable the password grant type

The password grant type should be disabled. Enabling it just encourages the development of insecure clients that are doing who-knows-what with your login info. Clients should be required to use the authorization_code grant type. The only location users should be entering their username and password is on the q.daskeyboard.com domain. Best practices are outlined in RFC 8252.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.