idolize Github contribution chart
idolize Github Stats
idolize Most Used Languages

Activity

28 Sep 2022

Idolize

Fixes

Pushed On 28 Sep 2022 at 10:22:30

Idolize

Support scroll up vs scroll down bindings

Pushed On 28 Sep 2022 at 09:26:58
Issue Comment

Idolize

Middle / Aux Mousedown events aren't supported

Problem

I love this project! It would be great to see middle mouse click supported and even side buttons! I have included where the change would need to be made and what would need to be added to support it.

Proposed Solution

this change could go in src/browser/browserEventProcessor.ts under mouse options (line 135ish):

listeners.auxclick = function auxclick(e) {
  const { button } = e as MouseEvent;
  const buttonName = `Aux${button}`; // will be named something like "Aux3"
  handleKeyEvent(buttonName, simulateBtnUnpress, simulateAxeDirUnpress);
}; 

I know you would then have to add some things to your mappings file and change the way you check that they are using mouse events, but I am willing to contribute if it is too much!

Forked On 28 Sep 2022 at 06:35:59

Idolize

Thanks for the PR! I've merged the changes, and will work on pushing this change to the Chrome store as a part of the upcoming 3.0 release.

Commented On 28 Sep 2022 at 06:35:59
Issue Comment

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16 resolves #28

Forked On 28 Sep 2022 at 06:35:04

Idolize

Works great - thanks!

Commented On 28 Sep 2022 at 06:35:04

Idolize

Add support for auxilary mouse buttons (#69)

  • Add support for auxilary mouse buttons

  • Explicitly assign MouseButons enum values

Pushed On 28 Sep 2022 at 06:34:55

Idolize

Add support for auxilary mouse buttons

Created On 28 Sep 2022 at 06:34:55

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16 resolves #28

Merged On 28 Sep 2022 at 04:48:51

Idolize

LGTM I will pull and test briefly before merge ๐Ÿ‘

Commented On 28 Sep 2022 at 04:48:51

Idolize

started

Started On 28 Sep 2022 at 04:32:45

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16

Forked On 28 Sep 2022 at 02:50:53

Idolize

Yep, enum is great, but to make it more explicit please add assigned numbers, since the numerical values are actually significant. ```ts export enum MouseButtons { Click = 0, MiddleClick = 1, RightClick = 2, Aux4Click = 3, Aux5Click = 4, } ```
On 28 Sep 2022 at 02:50:53

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16

Merged On 28 Sep 2022 at 02:51:24

Idolize

Commented On 28 Sep 2022 at 02:51:24

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16

Forked On 28 Sep 2022 at 02:45:59

Idolize

I believe this truthy check (`if buttonCode`) will fail if `buttonCode` is `0`. I would update this to the following: ```ts if (buttonCode !== undefined && codeMapping[buttonCode]) { ```
On 28 Sep 2022 at 02:45:59

Idolize

Add support for auxilary mouse buttons

Add support and typing for additional mouse buttons including MiddleClick, Aux4Click, and Aux5Click.

resolves #16

Merged On 28 Sep 2022 at 02:51:24

Idolize

Commented On 28 Sep 2022 at 02:51:24

Idolize

started

Started On 13 Sep 2022 at 12:15:09

Idolize

started

Started On 22 Aug 2022 at 09:41:00
Issue Comment

Idolize

queryRaw template not working with Jest

Bug description

I'm running the following SQL query with queryRaw:

const results = await prisma.$queryRaw`
        select
          posts.*,
          ${
            requestingUserId
              ? Prisma.sql`max(case when l.profile_id = ${requestingUserId} then 1 else 0 end) as is_liked_by_user,`
              : Prisma.empty
          }
          submitter.username
        from posts
        inner join user_profiles as submitter
          on posts.profile_id = submitter.id
        left join post_likes as l
          on posts.id = l.post_id
        where posts.show_id = ${showId}
        group by posts.id, posts.parent_post_id, submitter.username;
      `; 

This works correctly with requestingUserId == undefined when running in a normal node.js environment, but when I run the same query in the same code via Jest I get an error:

Invalid `prisma.queryRaw()` invocation:
  Raw query failed. Code: `42601`. Message: `db error: ERROR: syntax error at or near "("` 

I added some debug output to see the SQL and I notice it is trying to create a prepared statement in the select clause with what looks like the serialized JSON of the Prisma.empty object itself when I run in Jest (but it is correctly just inserting empty when running in the node server).

Node.js SQL

sql:
        select
          posts.*,

          sum(case when l.post_id is null then 0 else 1 end) as total_likes,
          submitter.username
        from posts
        inner join user_profiles as submitter
          on posts.profile_id = submitter.id
        left join post_likes as l
          on posts.id = l.post_id
        where posts.show_id = $1
        group by posts.id, posts.parent_post_id, submitter.username;
params: [550] 

Jest SQL

sql:
            select
              posts.*,
              $1
              sum(case when l.post_id is null then 0 else 1 end) as total_likes,
              submitter.username
            from posts
            inner join user_profiles as submitter
              on posts.profile_id = submitter.id
            left join post_likes as l
              on posts.id = l.post_id
            where posts.show_id = $2
            group by posts.id, posts.parent_post_id, submitter.username;
params: [{"values":[],"strings":[""],"text":"","sql":""},550] 

There's not much difference between my jest setup and my node.js server. I'm using supertest when running Jest to hit the API, so I was thinking maybe it's serializing+deserializing the Prisma.empty object to/from JSON and then failing some kind of instanceof check? But, I don't pass the query object between Jest/Express or anything like that - the code that creates the query and executes it is colocated in just the server (as you can see from my snippet above)...

How to reproduce

  1. Write a queryRaw statement that conditionally inserts Prisma.empty into the query
  2. Execute this statement in a Jest test
  3. See odd prepared statement attempting to pass a serialized version of the Prisma.empty object as a parameter to the query

Expected behavior

Similar to how it works when running directly via node, the Prisma.empty portion should be omitted from the query

Prisma information

const results = await prisma.$queryRaw`
        select
          posts.*,
          ${
            requestingUserId
              ? Prisma.sql`max(case when l.profile_id = ${requestingUserId} then 1 else 0 end) as is_liked_by_user,`
              : Prisma.empty
          }
          submitter.username
        from posts
        inner join user_profiles as submitter
          on posts.profile_id = submitter.id
        left join post_likes as l
          on posts.id = l.post_id
        where posts.show_id = ${showId}
        group by posts.id, posts.parent_post_id, submitter.username;
      `; 

Environment & setup

  • OS: macOS 12.1
  • Database: PostgreSQL
  • Node.js version: 16.13.0

Prisma Version

prisma                  : 3.8.1
@prisma/client          : 3.8.1
Current platform        : darwin-arm64
Query Engine (Node-API) : libquery-engine 34df67547cf5598f5a6cd3eb45f14ee70c3fb86f (at node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Migration Engine        : migration-engine-cli 34df67547cf5598f5a6cd3eb45f14ee70c3fb86f (at node_modules/@prisma/engines/migration-engine-darwin-arm64)
Introspection Engine    : introspection-core 34df67547cf5598f5a6cd3eb45f14ee70c3fb86f (at node_modules/@prisma/engines/introspection-engine-darwin-arm64)
Format Binary           : prisma-fmt 34df67547cf5598f5a6cd3eb45f14ee70c3fb86f (at node_modules/@prisma/engines/prisma-fmt-darwin-arm64)
Default Engines Hash    : 34df67547cf5598f5a6cd3eb45f14ee70c3fb86f
Studio                  : 0.452.0 

Forked On 19 Aug 2022 at 06:18:36

Idolize

I had to work around it for now with queryRawUnsafe, although it makes the code a bit messy.

@semoal what is the code you are using to prepare your SQL?

Commented On 19 Aug 2022 at 06:18:36
Issue Comment

Idolize

Scroll on 2 keybinds

Problem

i wantet to add scroll to right and left shoulder button

Suggested solution

Maby add scroll up or scroll down to the sttings so id dosent doubble up

Additional context

sorry for the bad english pls put this feature in i nned it for fortnite

Forked On 08 Aug 2022 at 04:14:49

Idolize

Thanks - yes this is something I intend to add shortly.

Commented On 08 Aug 2022 at 04:14:49

Idolize

started

Started On 01 Aug 2022 at 05:26:46

Idolize

started

Started On 01 Aug 2022 at 02:34:01

Idolize

More style tweaks

Pushed On 24 Jul 2022 at 04:04:54

Idolize

Working better

Pushed On 24 Jul 2022 at 12:54:54
Create Branch

Idolize

Chrome extension for controlling Xbox Cloud Gaming (Project xCloud) using a keyboard and mouse

On 23 Jul 2022 at 11:27:24