arduino-libraries / Keyboard

GNU Lesser General Public License v3.0
225 stars 158 forks source link

uint8_t keys[6]; #28

Closed thekunalsaini closed 4 years ago

thekunalsaini commented 4 years ago

changes uint8_t keys[6] to keys[5]; as we do not enter values through the loop but the value is entered like this :- key [0] = 0; (manually) some Memory can be saved through this.

thekunalsaini commented 4 years ago

@alranel please refer this

aentinger commented 4 years ago

@thekunalsaini can you please explain why you think this change is necessary?

thekunalsaini commented 4 years ago

@aentinger keys[5] is required it can save memory because total 6 values are require which can be covered by this.

aentinger commented 4 years ago

I am sorry but you are not making sense. Can you highlight me where this variable is used and can you guarantee that the array will never be exceeded? And ... btw ... keys[5] holds only 5 entries.

cmaglie commented 4 years ago

https://github.com/arduino-libraries/Keyboard/blob/master/src/Keyboard.cpp#L246-L265 The proposed change is wrong, IMHO we can close this as invalid.

aentinger commented 4 years ago

@cmaglie I think so too.Please close this, as I lack the powers to do so.

thekunalsaini commented 4 years ago

Oo due to some mistake i report this issue. Sorry please @aentinger